Revision as of 20:03, 6 June 2014 by SuperSmashScratch (talk | contribs) (What to not use it for: Again, fixed a link)

Without much work, when you hold a button, it can do things the button was set to do for a repeated amount of times. However, if you want to make the button be not holded, but only pressed once at a time, you can use the scripting in this tutorial.

What To Do

Holding Script

This is the holding-allowed script, which you want to avoid:

when flag clicked
forever
if <key [...] pressed?>
switch backdrop to [next backdrop]
end
end

Non-Holding Script

This is the non-holding-allowed script, which you want to use.

when flag clicked
forever
if <key [...] pressed?>
switch backdrop to [next backdrop]
wait until <not <key [...] pressed?>>
end
end

Uses

This could be useful for many things, such as announcement projects, or projects with only words. You do not want people skipping through words quickly on those projects, so this script could be useful.

What to not use it for

Do not use this in platformers with good physics and gravity, because it could make the jump only be a very small one. Instead, use it in the project examples in the part of this article Uses.