Fully automatic weapon?
I have managed to get a fully working weapon system for my game, however I have encountered a few problems. The main one is, how I can get my function to be called as long as the mouse button is pressed. Anyone know how I could do that?
Cheers, and thank you in advance for any help or advice.
asked Nov 04 '14 at 08:00 PM in C++ Programming
Hello there :) I implemented my automatic weapon system by having a StartFire and StopFire methods. When you press your mouse down you call StartFire, which spawns the projectile and then i set a SetTimer that calls StartFire again after the time interval between shots. When you release the mouse you call StopFire which clears the SetTimer used to create the loop.
answered Nov 04 '14 at 08:49 PM
Check out the ShooterGame example.
answered Nov 04 '14 at 09:24 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here