Author Topic: Light ON/OFF switch  (Read 1272 times)

Okay, So lets say I have a clear brick on my ceiling that I want to be a light, I've named it light1. And I have a switch by the door that I want to be able to press to turn on and off the light1. I've tried EventEnabled and cant get it working. Please post the correct way to do this.

I'm not sure, try making 2 separate switches.


I'm not sure, try making 2 separate switches.



Done that, Kinda lame though. Is what I'm asking even possible?

Yes, It's fairly simple.

Lightswitch:

Check    0 OnActivate Light SetLight PlayerLight
Uncheck 0 OnActivate Light SetLight NONE
Check    0 Onactivate Self ToggleEventEnabled 0 1

Then name your light "Light".

Yes, It's fairly simple.

Lightswitch:

Check    0 OnActivate Light SetLight PlayerLight
Uncheck 0 OnActivate Light SetLight NONE
Check    0 Onactivate Self ToggleEventEnabled 0 1

Then name your light "Light".

Strangely enough it didn't work... So I tried

Check    0 OnActivate Light SetLight PlayerLight
Uncheck 0 OnActivate Light SetLight NONE
Check    0 Onplaytouch Self ToggleEventEnabled 0 1

And that seemed to work...

You did it wrong, my method works.

Yes it is, to do so make the light, light1.
Make it this:
Onactivate, namedbrick:light1, setlight: players light
Onactivate, self, toggleeventenabled 1 2 3 4
Onactivate,(delay 1000)self cancelevents
Onactivate, namedbrick:light1, setlight: none

Yes, It's fairly simple.

Lightswitch:

Check    0 OnActivate Light SetLight PlayerLight
Uncheck 0 OnActivate Light SetLight NONE
Check    0 Onactivate Self ToggleEventEnabled 0 1

Then name your light "Light".

I turned off all of my add-ons and it worked. Now to find with Add-On forgets with my event enabled. Thanks, Works great!