Lasers that auto-on after (x) seconds. Created 19 years ago2005-02-13 14:07:30 UTC by ToneZone ToneZone

Created 19 years ago2005-02-13 14:07:30 UTC by ToneZone ToneZone

Posted 19 years ago2005-02-13 14:07:30 UTC Post #90145
I'm looking to create lasers that will cut back ON after an elasped time. Like in Openfire and Shutdown2, to name a two maps.
I've created the lasers that toggle off and on but I need a timed switch I suppose. The lasers start ON and are triggered OFF by the player but I want the lasers to stay off for (x) amount of time then cut back on.
Posted 19 years ago2005-02-13 14:57:24 UTC Post #90164
You just need to have your func_button trigger a multi_manager. In the MM properties, turn off smartedit and add two keys targeting the name of the laser entity. One could be set to 0 seconds, to turn it off immediately, and the other to X seconds, where X is the interval you desire. Make sure you func_button has a reset time longer than the interval, or things could get confusing.

More on multi_managers at this tutorial: http://www.twhl.co.za/tutorial.php?id=37
Posted 19 years ago2005-02-13 15:06:06 UTC Post #90165
I think I know...

Change the trigger's target to a multi_manager, and create a MM (short for multi_manager) named whatever you named the trigger's target. Have the MM turn off the laser by turning off SmartEdit and clicking the add button under the value field. Make the key the name of the laser and make the value 0.1. Why 0.1? Using 0 will not be guaranteed to work perfectly, so use 0.1. Then, press add again and repeat the same thing, but when you get to the value field, instead of putting 0.1, put x (the amount of time). What happens is that the MM triggers off the laser when 0.1 seconds has passed, and then it waits for x seconds, and when it passes x seconds, it triggers the laser again, turning it on. However, I think you will NOT have to make the delay for the trigger as long as x because if the MM is busy waiting for x seconds, it will tell the trigger not to go because it's busy, but if you have the multithreaded flag on, then it WILL go when it's busy and mess up the sequence.

Gosh, that's an awful amount of typing. I hope you can understand that or else I just wasted all of my time!
Posted 19 years ago2005-02-13 15:22:45 UTC Post #90170
D'oh, I think I took too much time typing a response. Oh well, mine is a more fixed up response! :P

And for the multithreaded flag business, at least I THINK that's true.
Posted 19 years ago2005-02-13 19:09:56 UTC Post #90282
Thank you VERY much LlamaRama3 and dandyli0n`!! Very quick responses from you both!
Got it to work after a few attempts. I re-read your post LlamaRama3 and saw that I had to make the func_button reset time longer, d'oh! What was also throwing me was that when I went to add the second key in MM (also named pY1s), to cut it off... it was being named pY1s#1, which is not the name of the laser. It was adding #1 at the end.
Just did a test during composing this... the reset time on the func_button doesn't have to be longer than the laser interval. I made it shorter, thinking that it might toggle it but it didn't. The laser stayed off for the specified time. However, I'm not saying I won't run into problems with that later. In keeping with Openfire and Shutdown, I'll keep the func_button time duration .1 longer than the laser duration.
Thanks again!!
I'm sure I'll have more questions later. :)
Posted 19 years ago2005-02-13 21:14:19 UTC Post #90303
Don't worry about the #1. It won't try to trigger pY1s#1, it'll still trigger pY1s.
Posted 19 years ago2005-02-13 23:18:05 UTC Post #90326
OR! to save time and effort, you could just use env_beam and modify the strike again values. :roll:
Posted 19 years ago2005-02-14 04:39:07 UTC Post #90340
You could also use trigger_relays to force it on or off, that might help. Look at our Entity Guide for details.
Seventh-Monkey Seventh-MonkeyPretty nifty
Posted 19 years ago2005-02-14 04:49:32 UTC Post #90344
Seems to me that Riley's method would be the simplest answer.
Posted 19 years ago2005-02-14 10:43:30 UTC Post #90400
VERC: StrikeTime (string) Strike again time (secs) (default: 1) - If the beam Life is not infinite, the value here determines how often it will strike.
That doesn't seem like toggling it on and off, it seems more like when it switches to another target. Either that, or it is a delay, but can the delay be triggered? I don't think it's triggered by a button.
I've created the lasers that toggle off and on but I need a timed switch I suppose. The lasers start ON and are triggered OFF by the player but I want the lasers to stay off for (x) amount of time then cut back on.
Posted 19 years ago2005-02-16 10:15:51 UTC Post #91011
Publish your map in 'problem maps' with a detailed description of what you'd like to achieve, and we should be able help more.
Posted 19 years ago2005-02-16 10:32:30 UTC Post #91012
For the trigger_relay way, one way you could do this would be to use two trigger_relays, one to turn it OFF instantly, and another to turn it ON after x (using "Delay before trigger"). Name them both the same thing, and then have the button trigger the name of one of the trigger_relays. It will trigger both since it has the same name, but it shouldn't be at the same time because the ON trigger_relay has a delay before it triggers.
Posted 19 years ago2005-02-19 01:51:38 UTC Post #91708
You must be logged in to post a response.