View Single Post
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