Alice Community  

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

Reply
 
Thread Tools Display Modes
Ammo system
Old
Watsamax1
Senior Member
 
Watsamax1's Avatar
 
Status: Offline
Posts: 155
Join Date: Aug 2009
Default Ammo system - 05-22-2010, 02:11 PM

I created a gun made a animation got a shooting method with limited ammo. But now id like it so you can get more ammo. I have spheres with guns in them. Ive created a method so that you can get ammo from them but it only works once. It like this. If camera is within 15 meters of sphere 4: Do in order: A do together method: mp5 assault rifel.ammo set value to 12, mp5 assault rifel.total ammo set value to 12, mp5 assault rifel.Rounds set value to 3, sphere 4 move down 3 meters. back in the do together method its wait 180 secs, sphere move up 12 meters.


___________________________________________________

Watsamax Industries
Games Produced for Watsamax Industries Inc. 2010
Watsamax Industries: New York
Watsamax@gmail.com
http://www.facebook.com/profile.php?id=100001253371874#!/profile.php?id=100001253371874&v=wall
http://www.youtube.com/user/Watsamax
___________________________________________________
   
Reply With Quote
Old
jediaction
Senior Member
 
jediaction's Avatar
 
Status: Offline
Posts: 5,064
Join Date: Jul 2009
Location: Bel Air, Maryland
Default 05-22-2010, 02:44 PM

Just make there number change to full when you get a sphere


Website: www.salokingames.com
FaceBook: www.facebook.com/SalokinGames
   
Reply With Quote
Old
Watsamax1
Senior Member
 
Watsamax1's Avatar
 
Status: Offline
Posts: 155
Join Date: Aug 2009
Default 05-22-2010, 02:57 PM

I got it to work now thnx. But i have a question i dont think it will be hard, But id like to loop like my gun turning in the sphere but it slows down. Anyway to stop it from stopping or slowing down.


___________________________________________________

Watsamax Industries
Games Produced for Watsamax Industries Inc. 2010
Watsamax Industries: New York
Watsamax@gmail.com
http://www.facebook.com/profile.php?id=100001253371874#!/profile.php?id=100001253371874&v=wall
http://www.youtube.com/user/Watsamax
___________________________________________________
   
Reply With Quote
Old
Dameria
Senior Member
 
Dameria's Avatar
 
Status: Offline
Posts: 976
Join Date: Sep 2009
Location: United States
Default 05-22-2010, 03:37 PM

Quote:
Originally Posted by Watsamax1 View Post
I got it to work now thnx. But i have a question i dont think it will be hard, But id like to loop like my gun turning in the sphere but it slows down. Anyway to stop it from stopping or slowing down.
That shouldn't be hard. I think I did this with the lollipops in my maze game if you want to see how I did it there. Just create another method that loops infinitely and turns the gun in the sphere 1 rotation (style: abruptly ..... duration: however fast you want it to turn, maybe 2 seconds)

If there are multiple guns in multiple spheres, you can just put them all into a list and have them all turn at the same time.


Check out my best projects so far and please comment:

Tic-Tac-Toe 2.0 ................... http://www.alice.org/community/showthread.php?t=3548
Alice Paint ........................... http://www.alice.org/community/showthread.php?p=23408
Real-Time Clock .................. http://www.alice.org/community/showthread.php?p=12725
Maze Game ......................... http://www.alice.org/community/showthread.php?t=4301
   
Reply With Quote
Old
Watsamax1
Senior Member
 
Watsamax1's Avatar
 
Status: Offline
Posts: 155
Join Date: Aug 2009
Default 05-22-2010, 04:14 PM

Works so good and looks so much more like a real game . im adding collision to the walls. Using a temple for my base/zoo area. Even added a timer so hat you wait 3 min before you get ammo again. 4 ammo places willl be 3 health.


___________________________________________________

Watsamax Industries
Games Produced for Watsamax Industries Inc. 2010
Watsamax Industries: New York
Watsamax@gmail.com
http://www.facebook.com/profile.php?id=100001253371874#!/profile.php?id=100001253371874&v=wall
http://www.youtube.com/user/Watsamax
___________________________________________________
   
Reply With Quote
Old
Watsamax1
Senior Member
 
Watsamax1's Avatar
 
Status: Offline
Posts: 155
Join Date: Aug 2009
Default 05-22-2010, 04:18 PM

Well i got another question. Id like to open/close a drophips door How like to open it but only if its closed it wont work for me.


___________________________________________________

Watsamax Industries
Games Produced for Watsamax Industries Inc. 2010
Watsamax Industries: New York
Watsamax@gmail.com
http://www.facebook.com/profile.php?id=100001253371874#!/profile.php?id=100001253371874&v=wall
http://www.youtube.com/user/Watsamax
___________________________________________________
   
Reply With Quote
Reply

Thread Tools
Display Modes

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.