Author Topic: Double on-activate event?  (Read 892 times)

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!

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)

Thank you!!  :cookie: :cookie: :cookie: for you

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)

You don't need an onRelay or fireRelay event.

You don't need an onRelay or fireRelay event.
Correct.

On Onactivate > self > Seteventenabled 0 1 2 (no)
On Onactivate > self > Setlight > player's light
On Onactivate > self > Set eventenabled 3 4 5 (yes)
Off Onactivate > self > Seteventenabled 0 1 2 (yes)
Off Onactivate > self > Setlight > None
Off Onactivate > self > Set eventenabled 3 4 5 (no)

On 0 OnAcitvation -> self -> SetLight -> Playerlight
Off 0 OnActivation -> self -> Setlight -> Off
On 0 OnActivation -> self -> toggleEventsEnabled 0 1

Wouldn't that work?

On 0 OnAcitvation -> self -> SetLight -> Playerlight
Off 0 OnActivation -> self -> Setlight -> Off
On 0 OnActivation -> self -> toggleEventsEnabled 0 1

Wouldn't that work?
Yep that would

On 0 OnAcitvation -> self -> SetLight -> Playerlight
Off 0 OnActivation -> self -> Setlight -> Off
On 0 OnActivation -> self -> toggleEventsEnabled 0 1

That's the simplest form, and is what I usually use.

Ya I looked at the other stuff and was confused. Very complicated for the simple minded.

I know this has already been settled, but I thought I'd share this with you anyway, it is the event I use for lamps in the Bluzone.



The last two events, set raycast, stop the player from spamming the light and being annoying/potentially breaking it.
You don't have to use "White Orb" like I have, either. That could be anything, such as the Player Light.

The Radio wave just adds a nice effect with a puff of electricity and makes a pretty little zap noise without needing to add an extra line of events.

c: