Just to be clear:
When I say "Burst-Fire", I mean a gun shooting a number of successive rounds with a single pull of the trigger.
With the code I have so far, I can make an Automatic/Semi-Automatic Rifle/SMG/Pistol/Shotgun/Spreadgun. You name it.
But for the love of god I am struggling to figure out how to make it burst-fire.
I've tried using loops and calling the same function within itself to no avail.
Here is a the section of my code:
- At the top is the conditions that need to be met for the function to be called.
- the "weapon.bulletsPerBurst" is what determines the weapon to be a single-shot or spread-shot.
- "weapon.burstRate" is what I use to determine how many times that weapon shoots successively.
Event Sheet Snapshot
<img src="http://i.imgur.com/ol5oQVe.png1" border="0">
Any help to make this work will be appreciated.
I'd probably do it something like this:
for 0 ... to bulletsInBurst-1
.. wait burstRate*loopIndex
.. Spawn bullet
.. Set variables