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

#1 2007-10-12 19:06:34

acevipa
Scratcher
Registered: 2007-10-09
Posts: 17

Disable use of key

I've made my game so that when the space key is pressed several sprites pop up as well as a background. It's all in the correct order when the space key is pressed once. How can I edit the game so that once this space key is pressed, pressing it again will not work.

Offline

 

#2 2007-10-12 19:43:19

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: Disable use of key

Just use a variable that will equal 1 once the space key is pressed and set it to 0 when flag is clicked. Then make the when key space pressed code execute only if the variable you created is equal to 0.


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#3 2007-10-13 07:20:20

Dthen
Scratcher
Registered: 2007-05-16
Posts: 26

Re: Disable use of key

Yeh, that will work  big_smile

Offline

 

Board footer