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
Old
Dameria
Senior Member
 
Dameria's Avatar
 
Status: Offline
Posts: 976
Join Date: Sep 2009
Location: United States
Default 05-22-2010, 04:28 PM

Quote:
Originally Posted by Watsamax1 View Post
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.
You could put a boolean variable on the door call "doorClosed" and then make an event in the events panel where if you click on the door, "if(doorClosed), door turn left (or right if that is how it turns) and 'doorClosed' set value to false. Else door turn right (or left) and 'doorClosed' set value to true". You can also have a wall on the door that is vehicle to the door, and that can be in the list of walls for your collision, so when the door is closed you cannot go through, but when it opens you can go through the doorway, the wall will just move with the door.


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, 09:43 PM

I got the guns to turn. but now ive created a dome and torus. For a siren in my ship to say like a emergency but it will stop did what you said but it wont work unless its 7 secs same as my guns.


___________________________________________________

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, 09:45 PM

As for the doors. they close but i can still have it open so its not one way or the other. my idea is to have them turn to a objects so they can only turn to it.


___________________________________________________

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-23-2010, 01:59 PM

No need for the door i decided its jammed so it always goes back 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
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 ©2023, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.