I'm making a little computer game and point of it is to shoot a ball at a key that is moving back and forth. If you hit it I programmed to fall out of the sky. That worked great, but when I hit the button with the flag on it, the key won't go back and forth any more. It just sits there facing the wrong direction. Any ideas on what I should do would be greatly appreciated!
Wizeguywilly
Offline
I just posted it. It's called bounce.
Offline
It doesn't even seem to be going back and forth now. It only goes back and forth the first time I run it.
Offline
wizeguywilly wrote:
I'm making a little computer game and point of it is to shoot a ball at a key that is moving back and forth. If you hit it I programmed to fall out of the sky. That worked great, but when I hit the button with the flag on it, the key won't go back and forth any more. It just sits there facing the wrong direction. Any ideas on what I should do would be greatly appreciated!
Wizeguywilly
add this script to the background
<when green flag clicked>
<set{ shooting }to( 0
and add this to the background
<when[ space ]key pressed>
<set{ shooting }to( 1
now make this the projectile's script
<when green flag clicked>
<forever>
<if><( <{ shooting }> <=> 0 )>
<go to[ gun thiing
<else>
<change y by( 2
<if><< <touching[ key <or> <touching[ edge >>
<set{ shooting }to( 0
<end>
<end>
Hope I helped
Offline
wizeguywilly wrote:
It doesn't even seem to be going back and forth now. It only goes back and forth the first time I run it.
just post a pic of the script that is a problem and we might be able to help.
Terminator355
I'd love to help!
Offline
try this in the key's:
When green flag clicked
Forever
change x by -10
If <touching bullet>
Hide
Goto x 480 y 180
Show
End
End
Use deatheater's script for the bullet and add "point towards mouse pointer".
Hope that helped!
Terminator355
Offline
I'm not sure what block you mean when you say end.
Offline
wizeguywilly wrote:
I'm not sure what block you mean when you say end.
it just ends the if/forever, just ignore them
Offline