Forum

> > CS2D > Maps/Editor > Switching light on/off
Forums overviewCS2D overview Maps/Editor overviewLog in to reply

English Switching light on/off

11 replies
To the start Previous 1 Next To the start

old Switching light on/off

CrazyPenguin
User Off Offline

Quote
How do I make lights switch on and off. I created a dark room and I want light to be switched inside with button but all light entity I place don't switch off when round starts to be switched on. I tried with start and delay trigger but with no effect



EDIT: I had placed wrong light entity without noticing I needed to place env_light which can be switch on and off with simple use trigger button
edited 1×, last 28.12.17 12:22:08 pm

old Re: Switching light on/off

Mr KompotMan
User Off Offline

Quote
So you basically want a blinking light?
If that's your cause, then first create trigger_start and your light entity.
Make your trigger_start trigger a delay which triggers the light and a second delay but we will get to that later. Also add at least 3 seconds to that delay.
Then create a second delay which triggers the first delay and also the light and add the same value of seconds as the first one.

I hope I explained it clear enough, unless I'd need to make a video for you.

old Re: Switching light on/off

CrazyPenguin
User Off Offline

Quote
Well the lights went off but I can't turn them on with the button

Here is what I did (trigger ->)

Start -> Delay1
Delay1 -> Delay2, light1 (3 seconds)
Delay2 -> Delay1, light1 (3 seconds)
Button -> light1

old Re: Switching light on/off

Mr KompotMan
User Off Offline

Quote
Well, that thing I taught you only automatically makes the lights blink. Which makes buttons useless or not working on that, if that wasn't the thing you we're expecting then I'm sorry.

old Re: Switching light on/off

CrazyPenguin
User Off Offline

Quote
I was going for a simple light on and off with a button in a room same like we do in our life when entering a room switching on or off the light

old Re: Switching light on/off

Pehlivan
User Off Offline

Quote
create a trigger_start, let it trigger ur light source and do the usual stuff with the button to turn it on/off. pretty easy

the light will start out off and can be then activated by a button, also deactivated. if thats what u wanted

old Re: Switching light on/off

crazy junkman Wolfgang
User Off Offline

Quote
@user CrazyPenguin: Just connect trigger_use to env_light, easy bussines.

And bit of advice for future, i see you have problems with basic stuff in editor, guess youre fairly fresh player, but no problem, you could check other maps how other players have done stuff in editor and learn from that.

old Re: Switching light on/off

Masea
Super User Off Offline

Quote
@user crazy junkman Wolfgang: Nope. He wants to make a blinking light which can be closed by players. So it will be blinking and also can be closed or opened at the same time. But what you suggested is just for making a basic light interacted with a cs2d entity trigger_use.

I believe this is impossible to make it via map editor. We can never know which delay is in the process when a player uses the button. However, we can know that by using Lua.

old Re: Switching light on/off

crazy junkman Wolfgang
User Off Offline

Quote
@user Masea: : Oh then i must have missunderstood, but nevertheless it can be done by using the editor, its not anything complicated but that process would use npc-s and explosions aswell as some walls and ofcourse delays. If @user CrazyPenguin: didnt find any solutions i could make small test map for you to study how its done.
edited 1×, last 28.12.17 12:19:39 pm

old Re: Switching light on/off

CrazyPenguin
User Off Offline

Quote
@user The_Admiral: read the comment above yours


read the original post where I specifically said this quote

"EDIT: I had placed wrong light entity without noticing I needed to place env_light which can be switch on and off with simple use trigger button"


And stop trolling people I can see that by all your comments made in my posts around forum

I would like if you do not reply at my comments at all
To the start Previous 1 Next To the start
Log in to reply Maps/Editor overviewCS2D overviewForums overview