whenclicked
foreverwait untilkeynpressed?ifnofail=onsetnofailtooffifnofail=offsetnofailtoon
Offline
im trying to have it so pressing n will toggle "NoFail mode"
Offline
G0D_M0D3 wrote:
slayerrobe7 wrote:
im trying to have it so pressing n will toggle "NoFail mode"
And what would noFail mode do?
Probably give you infinite health or something
Offline
Does that help?whenclicked
setswitchto0foreverwait untilkeyn ▼pressed?ifswitch=1setswitchto0elsesetswitchto1
[scratchblocks] when gf clicked set [switch] to (0) forever wait until <key [n v] pressed?> if <(switch)= (1)> set [switch] to (0) else set [switch] to (1) end end [/scratchblocks]
Last edited by Magnie (2012-01-27 19:57:09)
Offline
awesome magnie thank you
Offline
JSO wrote:
There's an easier way to toggle a variable between 0 and 1, like so:
whenclicked
setswitch ▼to0foreverwait untilkeyn ▼pressed?setswitch ▼to1-switch
That's pretty clever. I probably would have wasted my time with modulus xD
Offline
To prevent it from switching back immediately, you may want to include
At the bottom of the forever loop.wait untilnotnkey pressed?
Last edited by Kileymeister (2012-01-28 11:29:08)
Offline
whenclicked
setswitch ▼to0foreverwait untilkeyn ▼pressed?setswitch ▼to1-switchwait untilnotnkey pressed?
Offline
I know the problem.
Pretend it's on.
I turn it off.
It checks if it's off after it's off. Then it turns on.
Encountered two bugs while rendering the blocks.whenclicked
foreverwait untilkeyn ▼pressedifnofail=offsetnofail ▼toonelsesetnofail ▼tooff
Last edited by rdococ (2012-01-28 12:29:20)
Offline
MoreGamesNow wrote:
JSO wrote:
There's an easier way to toggle a variable between 0 and 1, like so:
whenclicked
setswitch ▼to0foreverwait untilkeyn ▼pressed?setswitch ▼to1-switchThat's pretty clever. I probably would have wasted my time with modulus xD
I figured that out too. xP
It can actually be used to toggle between any value and 0. I used this for Snake Eyes:
set volume to%100-volumefor the sound button
Last edited by scimonster (2012-01-28 13:51:55)
Offline
scimonster wrote:
MoreGamesNow wrote:
JSO wrote:
There's an easier way to toggle a variable between 0 and 1, like so:
whenclicked
setswitch ▼to0foreverwait untilkeyn ▼pressed?setswitch ▼to1-switchThat's pretty clever. I probably would have wasted my time with modulus xD
I figured that out too. xP
It can actually be used to toggle between any value and 0. I used this for Snake Eyes:set volume to%100-volumefor the sound button
It can actually be used to toggle between any two values, provided that you start on one of them and you have the correct values implemented.
I.E., between 1 and 2, start it on one of those values and do (3-value).
Last edited by Kileymeister (2012-01-28 14:03:57)
Offline
Remember to make it wait...
whenclicked
ForeverWait untilkeyn ▼pressed?Ifswitch=0Setswitchto1Wait0.5secsElseSetswitchto0Wait0.5secs
Last edited by KrIsMa (2012-01-29 13:15:10)
Offline
Just wanted to update my script.whenclicked
foreverwait untilkeyn ▼pressed?wait untilnotkeyn ▼pressed?ifnofail=offsetnofail ▼toonelsesetnofail ▼tooff
Offline
rdococ wrote:
Just wanted to update my script.whenclicked
foreverwait untilkeyn ▼pressed?wait untilnotkeyn ▼pressed?ifnofail=offsetnofail ▼toonelsesetnofail ▼tooff
Or you can use my script. But this is better XD
Offline
HabaDB wrote:
sound toggle how-to?
*sigh* they just posted it on the above posts. Read before you post!
I'll just post it again here:
scimonster wrote:
It can actually be used to toggle between any value and 0. I used this for Snake Eyes:
set volume to%100-volumefor the sound button
Offline
bob6 wrote:
HabaDB wrote:
sound toggle how-to?
*sigh* they just posted it on the above posts. Read before you post!
I'll just post it again here:scimonster wrote:
It can actually be used to toggle between any value and 0. I used this for Snake Eyes:
set volume to%100-volumefor the sound button
And the second to last please do not necropost that would be appreciated.
And this is the wrong thread to post the question under.
Last edited by KrIsMa (2012-08-22 00:12:44)
Offline