Alice Community  

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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Simple gunfire how to
Old
azgrimm
Junior Member
 
Status: Offline
Posts: 5
Join Date: Jun 2015
Default Simple gunfire how to - 06-23-2015, 08:31 PM

I discovered a relatively simple method to fire projectiles in Alice2.4, I imagine it would work the same in 3.1

1) Add your gun and bullet to the scene, scale your bullet and place it inside the gun *In order to ensure that the bullet fires straight,make sure that you adjust it's rotation.*

2) under the bullet's properties tab, set it's vehicle to the gun

3) create a new bullet method, I called mine Fire
[ Bullet move forward 20 meters duration= 0.1 seconds]

4) create a new event:
While [select key] is pressed
Begin [Bullet.fire]
During [do nothing]
End (drag the bullet's point of view from it's properties tab, ensuring that the numbers match) (set duration to 0.0)



This will ensure that the bullet returns to it's exact position and rotation in relation to it's gun vehicle at the end of it's .fire movement.

Alternatively you could set a second object in the distance that also uses the gun as a vehicle and change your fire method to [Bullet move forward Bullet distance to Target duration 0.1]

you can use the point towards method to adjust your sights, though make sure you change the point of view in your event if you adjust the bullet's rotation.

Hope this helps
   
Reply With Quote
 

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.