Author Topic: Event Help: Locking A Door  (Read 411 times)

Can someone give me the events to make a button.
When you click the button, it turns green and "unlocks" the door (anyone can open it). If you click it again, it turns red and no one can open the door (it is "locked.")

I did this:

[] OnActivate -> NamedBrick-Door1 -> toggleEventEnabled
  • <--- This is the OnActivate Self ContentOpen event that is canceled so people can't open it.
  • OnActivate -> Self -> ToggleEventEnabled [0 2 3]

[] OnActivate -> Self -> SetColor o
  • OnActivate -> Self -> SetColor o

    I have to click twice for it to "lock", so the colors are kind of useless since they change their meaning every time. Can someone give me the correct way to do this?

You should try using SetEventenabled instead and see if that works.

well do this:
Disable the first two door events and at the bottom put :
1 OnActivate>client>This door is locked
2 onActivate>self>playsound>doorsound.doorbuzzer.wav
(enable them)
and dissable the bottom ones and enable the top ones for unlock

Screnshots:
-Snip-

It worked! Thanks.

I did it kind of differently but whatever.