Author Topic: ToggleEventEnabled Not Working?  (Read 582 times)

Whenever I use the below event and I touch the brick, 0 1 2 3 are not enabling/disabling:

(Enabled) (0) OnPlayerTouch - Self - ToggleEventEnabled - 0 1 2 3
(Enabled) (1) OnPlayerTouch - (NamedBrick) - SetPlayerTransform (Relative)
(Disabled) (2) OnPlayerTouch - Self - ToggleEventEnabled - 0 1 2 3
(Disabled) (3) OnPlayerTouch - (OtherNamedBrick) - SetPlayerTransformed (Relative)

Basically, I want 0 and 1 disabled and 2 and 3 enabled when you touch the brick, which sends you to a brick. When you touch it again, 0 and 1 get enabled and 2 and 3 get disabled sending you to a different brick. (The problem is when I touch the brick the second time, it sends me to the same brick from the first time and it isn't enabling/disabling the desired events).

Why isn't this working? Or am I just screwing it up? Or maybe I am losing my mind? If you need me to explain this a little better, please tell me.

hello again

idk if you noticed or not, but to the very left of the output event box, there is a small box that looks like the small boxes in frot of the entire event strain.  when doing seteventenabled, you need to check this box if you want it enabled, or leave it blank for disabled.  i think disabled is the default, so your event problem makes sense.

hello again

idk if you noticed or not, but to the very left of the output event box, there is a small box that looks like the small boxes in frot of the entire event strain.  when doing seteventenabled, you need to check this box if you want it enabled, or leave it blank for disabled.  i think disabled is the default, so your event problem makes sense.
I have the first 2 enabled. The second 2 are not enabled. So when I touch the brick, it should disable the first 2 and enable the second 2, but it's not. Maybe ToggleEventEnabled doesn't work on touching a brick?

when doing seteventenabled,
Hes not using setEventEnabled, he's using toggleEventEnabled.

I have the first 2 enabled. The second 2 are not enabled. So when I touch the brick, it should disable the first 2 and enable the second 2, but it's not. Maybe ToggleEventEnabled doesn't work on touching a brick?

I just realized you're using toggleeventtnabled

Try switching around the events so that the toggle stuff is after the transform.


OnPlayerTouch could be the problem because it keeps activating the events.

Try using only one ToggleEventEnabled and only toggle between the other two events.

Try using only one ToggleEventEnabled and only toggle between the other two events.

i messed up, he had been doing this

OnPlayerTouch could be the problem because it keeps activating the events.

Should happen immediately, i think onplayertouch has a 20-50 millisecond respond time.

Im gunna try out your events and fix em up, idk why its not working.

Try using only one ToggleEventEnabled and only toggle between the other two events.
Actually, this is only part of the events, there are actually 2 more bricks I want the player to teleport to. So when the first person touches it, he teleports to brick1, the next time it's touched, he is teleported to brick2 and so on. So this wouldn't work. I should have mentioned this before.