Light switch Created 19 years ago2004-06-16 15:17:18 UTC by fon fon

Created 19 years ago2004-06-16 15:17:18 UTC by fon fon

Posted 19 years ago2004-06-16 15:17:18 UTC Post #33893
I've made a swich for switching lights on and keep them on for 30 seconds. Well, it wasn't so difficult. But I need sometning more. When a player press it before the lights are switched off (sooner then 30 seconds) the lights will stay on for another 30 seconds or next hit. Otherwise they will after 30 second switch off.

Btw. have you got any good sample map for <i>multi_managers</i> or things like this.

Thank you fon
Posted 19 years ago2004-06-16 15:39:08 UTC Post #33894
http://collective.valve-erc.com/index.php?ent=game_counter
http://collective.valve-erc.com/index.php?ent=game_counter_set
http://collective.valve-erc.com/index.php?ent=multi_manager

The multi_manager triggers the game_counter every second, and also triggers itself so the game_counter gets triggered every second. The multi_manager has to be set to multithreaded so it can be looped, e.g. trigger itself.
The game_counter is initially at 0, with a maximum of 30, at wich it triggers the light. However, when you push the button to reset the 30 seconds counter, the game_counter_set sets the game_counter to 0 again. That should do it, although I haven't tested it out now.
You must be logged in to post a response.