I've been wondering if this is possible to duplicate in some way in sexscripts. I'm at a loss because all uses of buttons seem to freeze the script. Is it possible to have a button just sit until it is clicked?
Code:
In CM:
[Block]
message=Start!
report=Done!
delay=30
reportlate=BlockTimeOut
next=BlockSuccess
[BlockSuccess]
message=Completed
next=End
[BlockTimeOut]
message=Out of Time
next=End
Most people probably know this but just for the users who might not; The above code would give you 30 seconds to click the button and be directed to [BlockSuccess], if 30s pass without a a click from the user you would be redirected to [BlockTimeOut].
Ideally in SS we could use a passive button to sit idle during loops without freezing the script then upon being clicked could break a loop or set a value, anything. I'm pretty rusty in legit programming languages, but I can't figure it out, if anyone has a way I'd appreciate it. Thanks!
What I wish was possible:
Code:
while(!Ended){
def i = getRandom(5);
show("The current number is "+i+", when you see a number you like tell me")
if(idleButton("I like this number"))
Ended = true;
wait(5);
}