Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Reply
 
Thread Tools Display Modes
FPS elements
Old
SirThorfinn
Senior Member
 
SirThorfinn's Avatar
 
Status: Offline
Posts: 232
Join Date: Sep 2010
Location: Some where Unreal!
Default FPS elements - 09-11-2010, 03:25 PM

Things i need to make my fps work:
1) how do you create a health bar system and make people lose health when the bullet contacts them.
2) are you able to create things like a set amount of ammo per clip and then you have to preform the reload animation to get more ammo.
3) an enemy A.I.
4) Head movement with the mouse <all axises, up, down, left, right> like any other FPS on the computer.
5) Cross hairs
6) and anything else that can be good for a FPS
7) weapon switching
8) Explosions

Answers to any of theses is greatly appreciated!

Here is my beta version/ experiment with animations and stuff until i fugure out how to do it better.
solider.a2w

Last edited by SirThorfinn; 09-11-2010 at 03:33 PM.
   
Reply With Quote
Old
debussybunny563
Senior Member
 
debussybunny563's Avatar
 
Status: Offline
Posts: 852
Join Date: May 2010
Arrow 09-11-2010, 03:46 PM

For the moment:

1. Refer to this thread: 4 ways to count health
As for bullet collision: Bullet Collision

2. Yes, and yes for all the rest as well. Create a number variable for ammo, and in the firing method each time put ammo set value to ammo-1 (or decrement ammo by one, whichever you prefer). Also use an if/else statement for the shooting method, stating that if ammo > 0, fire method, else do nothing. That way, you will only run the shooting method if you have ammo left. Then make a reload method, at the end of which have ammo set value to 30 (or whatever your clip size is).

3. Ah, AI. This is difficult to explain (and to a certain extent, make), but you can look at my FPS for an example (link is in #6)

4. If you want the mouse to always stay in the middle, use this: FPS test game.a2w
If you instead think it looks a bit weird, and want it so that the mouse, when it hits the edge of your world screen, want it to move to the opposite edge, then use this: FPS 2 Smooth.a2w (which is what I personally prefer)

5. Depends on how much you're settling for. For simplicity, go into the object gallery, go to shapes, and select the torus. Move it so that it's practically touching the camera, and resize it so that it's small enough to be a useful reticle. Otherwise, search online for a crosshair you like, re-save it as a png file, add an alpha channel, select all the white parts (or any part that you don't need), and delete them. Then import it into Alice by making it a billboard, and follow the same steps for putting it in the right place as the torus.

6. You can refer to my FPS here: xfinal4, which contains all of the above elements and plenty more. Unfortunately, there is A LOT of coding involved in making a detailed FPS game, and I will hold in great regard those who may decipher the code.

7. Also in my FPS. I would make a number variable, and assign each of your weapons a number. But I also need to know, what kind of weapon-switching system do you want? Do you want to assign number presses (ex. press 1 for weapon 1, press 2 for weapon 2, etc.) or use just one or two keys (ex. press "E" to switch one weapon # higher)?

8. Explosions? Could you be more specific? For a 2D animated explosion, look here: Splosion.a2w How are you planning to have explosions in your world?

Anyway, if you want to know how I did something, ask.


Last edited by debussybunny563; 12-21-2012 at 12:00 AM.

|--------------------------------------------------------------------------------------------------|
|Link to weapons collection: http://www.alice.org/community/showthread.php?t=7368 |
|--------------------------------------------------------------------------------------------------|

I have been dead for quite some time now; not much hope for resurrection.

Last edited by debussybunny563; 09-11-2010 at 04:13 PM.
   
Reply With Quote
Old
jediaction
Senior Member
 
jediaction's Avatar
 
Status: Offline
Posts: 5,064
Join Date: Jul 2009
Location: Bel Air, Maryland
Default 09-11-2010, 05:45 PM

Quote:
Originally Posted by SirThorfinn View Post
Things i need to make my fps work:
1) how do you create a health bar system and make people lose health when the bullet contacts them.
2) are you able to create things like a set amount of ammo per clip and then you have to preform the reload animation to get more ammo.
3) an enemy A.I.
4) Head movement with the mouse <all axises, up, down, left, right> like any other FPS on the computer.
5) Cross hairs
6) and anything else that can be good for a FPS
7) weapon switching
8) Explosions

Answers to any of theses is greatly appreciated!

Here is my beta version/ experiment with animations and stuff until i fugure out how to do it better.
Attachment 3506
uh yah. Pretty much....anyway....yes, you should look at my fps stuff to get a good look at what to do...


Website: www.salokingames.com
FaceBook: www.facebook.com/SalokinGames
   
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2024, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.