This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2007-05-26 11:39:12

Nabster
Scratcher
Registered: 2007-05-26
Posts: 8

key released?

hey, i was wandering how can you tel your script to do something when you release a key. i would find this useful when walking. i want to make my game so when you hold the right arrow key down it changes the costume. then, when the right arrow key is released, it changes to the original costume. sort of like a while loop.

thanks in advance.

P.S. i have tried usinf forever if and repeat until but they don't work.

Last edited by Nabster (2007-05-26 12:36:06)

Offline

 

#2 2007-05-26 13:26:15

kevin_karplus
Scratcher
Registered: 2007-04-27
Posts: 1000+

Re: key released?

forever if arrow key pressed
    change costume
    wait until not arrow key pressed
    change costume

Offline

 

#3 2007-05-26 13:40:00

Nabster
Scratcher
Registered: 2007-05-26
Posts: 8

Re: key released?

whoops. forgot to say that the sprite is moving aswell. with the way you told me i havwe to press right,right,right,right to get anywhere when i want a steady walk.

EDIT: never mind i can use repeat until for this. sorry

Last edited by Nabster (2007-05-26 13:42:19)

Offline

 

Board footer