Code: Select all
screen timeout_event:
key "a" action Jump("pressed_a")
timer 5.0 action Jump("timed_out")
call screen timeout_event
Code: Select all
key "a"
Code: Select all
screen timeout_event:
key "a" action Jump("pressed_a")
timer 5.0 action Jump("timed_out")
call screen timeout_event
Code: Select all
key "a"
Code: Select all
screen timeout_event:
modal True # player will be forsed to interact with screen
key "rollback" action NullAction()
key "rollforward" action NullAction()
default click_on = False # some flag var
key "mousedown_1" action If(click_on, [Hide("timeout_event"), Return()], [Hide("timeout_event"), Jump("lose")]) # left-click
# timers will change the flag var
timer 2.0 action SetScreenVariable("click_on", True)
timer 3.0 action SetScreenVariable("click_on", False)
timer 5.0 action SetScreenVariable("click_on", True)
timer 6.0 action SetScreenVariable("click_on", False)
timer 7.0 action [Hide("timeout_event"), Jump("lose")]
label start:
scene black
"..."
show video_bg
show screen timeout_event
"click on 2-nd or 5-th second!"
"You've did it!"
"?"
return
label lose:
"Game over..."
jump start
Code: Select all
timer 6.0 action [SetScreenVariable("click_on", False), [Hide("timeout_event"), Jump("lose")])
Code: Select all
timer 6.0 action SetScreenVariable("click_on", False), [Hide("timeout_event"), Jump("lose")]
I've edited the code a bit (there was warning that code is untested)
Users browsing this forum: Ahrefs [Bot]