m (What to not use it for: I forgot to add a bar)
(Undo revision 102463 by 3sal2 (talk)Not true. No one has said anything about it, so that hasn't been proven true.)
Line 1: Line 1:
{{wiki Standards|Biased article with improper format.}}
 
 
[[Category: Scripting Tutorials]]
 
[[Category: Scripting Tutorials]]
 
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.
 
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.

Revision as of 22:37, 18 August 2014

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?>
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?>
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.