Alice Community  

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

Reply
 
Thread Tools Display Modes
how do i make a gun reload?
Old
Coreyjames25
Guest
 
Status:
Posts: n/a
Question how do i make a gun reload? - 04-20-2009, 01:43 PM

ok so I have a revolver from the old west class. and than a sphere set as a vechile to the barrel of my reolver. this is my ammunition and at this point I have it move forward 500 meters than set opacity to 0 and move back to the barrel in 0 seconds and opacity back to 100. than I click to shoot. my question is how do I make it shoot faster and after 6 shots I want it to reload. I hope this makes sense.
   
Reply With Quote
Old
Gamma God
Guest
 
Status:
Posts: n/a
Default 05-08-2009, 06:24 AM

well you must make a method for the reloading prosses and in the same method chech if the user has shot 6 times use a number variable under the World Properties tab.

So you might use a while loop to repeatedly check with an If Else statement, but instead of just (If TRUE do this or that, else do nothing) you might use ( If world.Stop is = 6 then) and methods would follow to show your animation for reloading the revolver. if you need more help I'll be checking regularly...
   
Reply With Quote
Old
Scott300
Senior Member
 
Status: Offline
Posts: 80
Join Date: Feb 2009
Location: Ohio
Default 05-08-2009, 07:43 AM

while true
{
if world.ammoleft <= 0
{
set world.ammoleft == 5
ammo1 move to gun
ammo2 move to gun
ammo3 move to gun
ammo4 move to gun
ammo5 move to gun
}
}
  Send a message via AIM to Scott300 Send a message via MSN to Scott300  
Reply With Quote
Old
vazin
Guest
 
Status:
Posts: n/a
Default 05-22-2009, 03:11 PM

Quote:
Originally Posted by Coreyjames25 View Post
ok so I have a revolver from the old west class. and than a sphere set as a vechile to the barrel of my reolver. this is my ammunition and at this point I have it move forward 500 meters than set opacity to 0 and move back to the barrel in 0 seconds and opacity back to 100. than I click to shoot. my question is how do I make it shoot faster and after 6 shots I want it to reload. I hope this makes sense.
AN extremely elegant example is posted by x2495iiii, called InfernoValley posted on my site
tech4dreams.com

The Java3d version has some bugs, but works perfectly on a2w

Hope is useful information

Cheera
   
Reply With Quote
Reply

Tags
ammo, ammunition, bullet, gun, reload

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 ©2019, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.