Author Topic: how do i use toggleeventenabled?  (Read 440 times)

ok so i want to make a light turn off and on with the same button. i know i can use toggleeventenabled to do that, but how? one of my friends briefly explained it to me, but i didnt get it very well. can one of you guys give me a detailed tutorial? this would help me out a lot, thanks

{0}onactivate namedbrick setlight yellow light
{1}onactivate namedbrick setlight none
{2}onactivate self toggle-events-enabled [0 1]

It does work.

Thanks for codes.

=D
 :cookie: :iceCream:

If you set the check box beside the event, the event wont work. When you use toggle event enables, it toggles this and puts it to true. Basicly:
(- is unchecked and + is checked)

+ OnActivate>Self>SetLight>Players Light
- OnActivate>Self>SetLight>NONE
+ OnActivate>Self>ToggleEventEnabled [ 0 1 ] (sperate with spaces)

oooooooooo! awesome i get it now thanks for your help guys!

If you set the check box beside the event, the event wont work. When you use toggle event enables, it toggles this and puts it to true.

oh yeah, sorry. i forgot to uncheck one of my boxes :P

oooooooooo! awesome i get it now thanks for your help guys!
You should lock this thread then to avoid bumping :\