How to Get a Gun to Shoot?

Hey guys (This is PinkSkinks brother)

I am making an FPS in Blender, and I am wondering how to get my gun to shoot. At the moment, all it can do is walk around holding a gun.

I’m pretty sure it has something to do with the “edit object” actuator, but I can’t get that to work. I’ve got the type set to add object, and I put my object into the field, but it doesn’t work. :confused:

Any help would be much appreciated.

Thanks

so wait…What’s your problem??? The gun shooting animation isn’t working, or the bullet isn’t working???

Uh, I can’t get my bullet to emit from my gun. I’m trying to get an object to come out of my gun, and I can’t. Hope that explains it. :stuck_out_tongue:

just get it to shoot at a velocity
also, when you add object, did you check to make sure it was connected to the button nodes?
might be the problem
and also, the velocity will have to be turned up to “shoot”

Unfortunately ive had to go through this particular process before…

First. have yuor gun.
Then. Make your bullet (it only actually has to be a single vertex, when you think about it because imagine having a whole bunch of perfectly shaped high poly models wizzing around the place)
Now. Make an EMPTY at the end of your gun.
Continue. Then make this empty spawn your bullet when the intended button is clicked.
Now. no movement?
Make it so that your original bullet is on another layer and is CONSTANTLY moving at the speed yuo want i any direction you want (go with z because its easiest in the end)
Now. Click your intended key. if it goes up, change the direction that the empty is pointing.
Now. You have a working gun that uses the lowest poly ammo in the universe.

HAVE FUN

Yes!! SUCCESS!!! Hehe…Thanks so much guys, esp. Wefyb. Got it to work first try! Yay! :smiley:

Oh. One other small thing: Can I get sound every time I shoot?

Thanks

Thanks, happy to be of help.
Although, sound isnt something im good with, i only really have the most basic knowledge of GE, just happens to e on topic i looked into.

Also, are yuo using the single vertex idea? personally i havnt tried it because i was just using a cube but i would be very interested to see if it actually works with collision…

that feature isnt available yet in blender 2.5but if you download blender 2.4 as a backup blender, you can add the sound in blender 2.4 and then append it (file->append) and it will work in 2.5

I see. Thanks much, I will try it as soon as possible! :slight_smile:

Is there any way I can get sound in my current game I’ve made? (I’ve made it in 2.5)