Hello there, I am a 6th Form student in desperate need for some assistance with an issues I have ran into.
Problem: When bullets = 0, targets hit still registers points - Basically, my game is a target practise game where you shoot an M4 rifle at the targets that pop up. Now after so much time being put into the game, I cannot seem to fix a very simple issue. When there are no bullets left in the clip, when clicked on the target, it still registers it as a point; I have tried many different if statements, changing variables etc etc.
Please any help would be greatly appreciated.
Link to the scratch project: http://www.speedyshare.com/JRJEY/TARGET-PRACTISE.sb
Link to the scratch project virus scan: https://www.virustotal.com/en/file/bff520b11b5acc61ab12f62d8ba250e244de8f5152fa3f720919cdafea3ebe59/analysis/1361126747/
Thank you.
Offline
The problem is that the bullets = 0 only affects one loop and all that loop controls is the sound effect, costume change and number of bullets. Add ifs to all of the loops required (all of the ones in the targets and the one in the aim sprite) to ensure that you need to have more than 0 bullets.
Also, the forever around the repeat until seems a bit redundant.
Last edited by Smozzick (2013-02-17 15:28:37)
Offline
Okay, I see what your issue is. You know how in your reticle (the targeting sprite), as well as in your targets, how you use this conditional?
(mouse down?)
<(mouse down?) and <(Bullets) > (1)>>
Last edited by ErnieParke (2013-02-17 15:30:58)
Offline
bob6 wrote:
ErnieParke wrote:
<(mouse down?) and <(Bullets) > (1)>>
... and you should be good!
I hope that this helps!He means
<(mouse down?) and <(Bullets) > (0)>>
Yes, yes I did, so thanks for pointing that out!
Last edited by ErnieParke (2013-02-17 21:09:41)
Offline