I am having a problem with a Scratch project where I want a gun shot to move towards a target, which are two separate sprites. I have told this to do so when I press the space bar. But when I press this a second time it will not got to the target, but stays on the same course as the last shot. What should I do? Sorry if this doesn't make sense.
Offline
I can't answer with certainty unless you post it, but it sounds to me like the old script is still running and pressing SPACE won't reactivate the script because the old script is still running.
<when[ SPACE ]key pressed>
<point towards( target )>
<repeat until> << <touching[ target ]> <or> <touching[ edge ]> >>
<move( 5 )steps>
<end>
Bear in mind, you won't be able to shoot until after the bullet hits the target or the edge of the screen.
Offline