Blockland Forums > Help
Double on-activate event?
WALK2222:
Is there an event that allows me to use the on-activate event twice? example: clicking a light to turn it on/off with just two clicks. I do not mean using JVS, I do not want any named_brick events at all
Thanks!
Ipquarx:
You can do this using regular, default events, and you can even set your own time limit.
I propose the following events, note that the first field is enabled, second field is delay, etc.. and that the second events delay is the double-click speed:
1 0 onActivate -> self -> toggleEventEnabled - 0 1 2 3
1 250 onActivate -> self -> toggleEventEnabled - 0 1 2 3
0 0 onActivate -> self -> fireRelay
0 0 onRelay -> self -> (Do Stuff Here)
WALK2222:
Thank you!! :cookie: :cookie: :cookie: for you
Ipquarx:
Oh crap, small error i made there, i accidently deleted a line.
The correct events:
1 0 onActivate -> self -> toggleEventEnabled - 0 1 2 3
1 250 onActivate -> self -> toggleEventEnabled - 0 1 2 3
0 0 onActivate -> self -> fireRelay
0 0 onRelay -> self -> toggleEventEnabled - 0 1 2 3
1 0 onRelay -> self -> (Do Stuff Here)
Electrk:
You don't need an onRelay or fireRelay event.