IF _KEYDOWN(32) AND keydelay
= 0 AND readyforsound
= 1 THEN ' if spacebar pressed and bullets stopped firing and ready for sound readyforsound = 0
soundlength
= _SNDLEN(multilasersound
) 'get length of the sound file in seconds _SNDVOL multilasersound
, soundlevel
'play sound file with specified sound volume _SNDLIMIT multilasersound
, soundlength
'stop playing the sound after the calculated duration. I believe this part also counts down??? IF soundlength
<= 0 THEN ' if sound file finished playing then readyforsound = 1 ' makes it possible for script to be run again
numshots = 0
'------------------- code that shoots the bullets --------------
keydelay = 5
IF keydelay
THEN keydelay
= keydelay
- 1 multishotscriptran = 1