Pages: 1
Topic closed
I wanted to make my sprite move up when the up arrow is pressed. Originally, I used the if block with the condition from the sensing section so it was if key <up arrow> is pressed?
but it didn't work.
I finally discovered the When key <up arrow> is pressed ....
that worked but it would seem to me that the if block should work. Has anyone else have this trouble? Why have the key pressed under sensing if it cannot be used?
Offline
I does work. Were you useing: When Flag Clicked, forever, if key 'up arrow' pressed, change y by 10? Because it will work that way.
Offline
This is the structure you want (that Targethero describes above) ...
[blocks]
<when green flag clicked>
<forever>
<if><key[ Up Arrow ]pressed?>
<change y by( 10
<end>
<end>
[/blocks]
If you don't have the Forever loop around it, then the test will only take place once (when the Green Flag is clicked). You need for the test to happen over and over again.
Offline
Topic closed
Pages: 1