Author Topic: ToggleEventEnabled  (Read 469 times)

I have no idea how this event works, but I know what it's useful for. I just seriously need help. No one has ever really helped me learn how to use it.

In the beta city save. Go to the train station. The events for the light switch use it.

That's how I learned it.

In the beta city save. Go to the train station. The events for the light switch use it.

That's how I learned it.
Or: Load demo house.

Basically toggle event enabled does as it's named, for example: if you wanted to build something that would shift colors you would make it something like:

[!]0 Onactivate self setcolor green
[!]1 onactivate self toggleeventenabled 0 1 2 3
[ ]2 onactivate self setcolor blue
[ ]3 onactivate self toggleeventenabled 2 3 4 5
[ ]4 onactivate self setcolor red
[ ]5 onactivate self toggleeventenabled 4 5 0 1
[!] is activated. when clicked it would set the color to green, then clicked again blue, then again red, then green again and keep cycling.

[X]0onActivateClientchatMsg<color:FFFF00>%1<color:FFFFFF>: I'm a chimp.
[ ]1onActivateClientchatMsg<color:FFFF00>%1<color:FFFFFF>: And I like feet
[ ]2onActivateClientchatMsg<color:FFFF00>%1<color:FFFFFF>: Big feet
[ ]3onActivateClientchatMsg<color:FFFF00>%1<color:FFFFFF>: And men.
[X]4onActivateSelfToggleEventEnabled0 1 4 5
[ ]5onActivateSelfToggleEventEnabled1 2 5 6
[ ]6onActivateSelfToggleEventEnabled2 3 6 7
[ ]7onActivateSelfToggleEventEnabled3 0 7 4

More simpler version.

  • onactivate-self-setcolor

1  [ ] onactivate-self-setcolor
2  [ ] onactivate-self-toggleventenabled [0 1  ]

Notice how the x is only on the first event? (which is 0) and how toggleeventenabled in the 2nd box is      [0 1 ]

0 is the first event and 1 is the 2nd so its toggling between each one

Or for a simple light
Code: [Select]
0. [X] OnActivate>Self>SetLight>[OrangeLight]
1. [X] OnActivate>Self>ToggleEventEnabled>[0 2]
2. [  ] OnActivate>Self>SetLight>[NONE]