Mentor, I think you're looking at the code the wrong way. The monkeyshine logic merely loops through the five bullet slots and looks to see any of them are not in use. If all five bullets are in play, the routine exits. If an open slot is found, plcreate is called and a new bullet in made. The bug was that "playerbullet(yy) = 1" was
above the plcreate label and was thus never called.
Starsu's code should work with the fixes that I mentioned. The important next step for him is to make sure that the bullets 'expire' and the bullet slots are set back to zero. Otherwise, he'll never get to fire more than five bullets.
Thoughts on bullet expiring: Of course, if they hit something during the collision check they should expire. You can also add an element to the bullet array to hold either time or distance values. I think distance would be easier to code. Something like this after the move object command...
` technical note, you might have to change the dim to this
dim playerbullet(4,2) as float
for a = 0 to 4
if playerbullet(a,1) = 1
b# = (10/screen fps())
move object a+25, b#
playerbullet(a,2) = playerbullet(a,2) + b#
if playerbullet(a,2) > maximumRange
playerbullet(a,1) = 0
playerbullet(a,2) = 0
delete object a+25
endif
endif
next a
--
TAZ