View Single Post
Junior Member
Status: Offline
Posts: 5
Join Date: Dec 2011
Location: Canada
Default 12-19-2011, 11:07 PM

Having bullets move back and forth between the gun tends to not work. The bullets ignore frames and any detection or bullet collision you had is ineffective.

Usually I use a method similar to this:

That's the basic bullet collision detection I use (Look for the cone in the objects, that is the detector).

Also to keep track of bullets I use a number variable and some 3D text.

Lets say for example I use
3dtext set value (int (world.bulletvariable) as a string)
Use this in a infinite loop and it will keep track of your ammo.
Have the default setting of the variable be your max ammo in clip.
Now whenever you shoot just drag the variable in the shoot mechanism and choose decrement (world.bulletvariable) by 1. This will then adjust your ammo accordingly.

When you reload, just drag the variable into the reload mechanism and have it set (world.bulletvariable) to (30 or whatever your max ammo is)

Works like a charm. If I went a bit off-topic--sorry. Hope this helped.
Reply With Quote