Hi I'm making a project and to progress to the next screen you press 'g',but if you press 'g'
again after that its mucks up the whole thing so how do you make the 'g' button only work that once?
Please help!Really grateful
Offline
FishingPro98 wrote:
Hi I'm making a project and to progress to the next screen you press 'g',but if you press 'g'
again after that its mucks up the whole thing so how do you make the 'g' button only work that once?
Please help!Really grateful
Make a variable called 'g'. Then when the green flag is clicked make 'g' set to 'not pressed'.
Now when G is pressed set 'g' to 'pressed'
However put whatever action you want in an 'if else' statement of
[<if <not<g = not pressed>>]
[progress to next slide]
[else]
[leave the bit blank.]
Offline
when green flag clicked set [g pressed v] to (0) wait (0) secs wait until <key [g v] pressed?> set [g pressed v] to (1) when green flag clicked wait (0) secs wait until <key [g v] pressed?> do stuffDarn, outposted.
Last edited by benjamin2 (2012-08-22 07:48:09)
Offline
yes, the wait until block would work for this.
Offline
How about
when gf clicked set [g] to (0) forever if <<key [g v] pressed> and <(g)=[0]>> set [g v] to (1) end endSorry about the messed up block
Last edited by Scratcher456 (2012-08-23 20:13:22)
Offline
Scratcher456 wrote:
How about
when gf clicked set [g v] to (0) forever if <<key [g v] pressed?> and <(g)=[0]>> set [g v] to (1) endSorry about the messed up block
Fixed!
Offline
gfchll wrote:
when key [g v] pressed do script stop script
That wouldn't work. I was thinking more along he lines of:
when gf clicked your script repeat until (key [g v] pressed?) your scripts end your scripts
Last edited by ErnieParke (2012-08-23 20:37:12)
Offline