I want to set up a trigger_hurt that is activated after a delay (with alarm sounds). It's done in dm_crossfire and dm_runoff.
I also want another button to turn the count-down off.
What is the exact entity intput/output that I need for this (on_use, activate, etc)?
Thanks in advance.
1
Re: Bombing Effect
Posted by satchmo on Thu Mar 1st at 7:01pm 2007

satchmo
member
2077 posts
396 snarkmarks
Registered: Nov 24th 2004
Location: Los Angeles, U.S.
Occupation: pediatrician
Posted by satchmo on Thu Mar 1st at 7:01pm 2007
satchmo
member
2077 posts
396 snarkmarks
Registered: Nov 24th 2004
Location: Los Angeles, U.S.

Occupation: pediatrician
"The greatest thing you'll ever learn is just to love and be loved in return." -- Toulouse-Lautre, Moulin Rouge
Re: Bombing Effect
Posted by Natus on Thu Mar 1st at 7:27pm 2007
Posted by Natus on Thu Mar 1st at 7:27pm 2007
I can only answer the first part of the question, not too sure on how to stop a countdown.
Anyway, if you have a func_button, an ambient_generic (make sure flags are set to start silent and play everywhere) and a trigger_hurt, set the func_buttons output to:
OnPressed
(name of your trigger_hurt)
Enable
And:
OnPressed
(Name of your ambient_generic)
Playsaound
Then just set the delay to how long you want it to count down.
Also, Use the same but with Disable and StopSound, after a longer delay to stop the trigger from killing stuff, and leaving the alarm sound on.
Anyway, if you have a func_button, an ambient_generic (make sure flags are set to start silent and play everywhere) and a trigger_hurt, set the func_buttons output to:
OnPressed
(name of your trigger_hurt)
Enable
And:
OnPressed
(Name of your ambient_generic)
Playsaound
Then just set the delay to how long you want it to count down.
Also, Use the same but with Disable and StopSound, after a longer delay to stop the trigger from killing stuff, and leaving the alarm sound on.
Re: Bombing Effect
Posted by satchmo on Thu Mar 1st at 9:23pm 2007

satchmo
member
2077 posts
396 snarkmarks
Registered: Nov 24th 2004
Location: Los Angeles, U.S.
Occupation: pediatrician
Posted by satchmo on Thu Mar 1st at 9:23pm 2007
Thanks. I think that'll work.
As for stopping the count-down, maybe I'll set up a logic_relay entity for the count-down and disable it when the second button is "OnPressed".
With the first button, I'll "Enable" the logic_relay entity to start the count-down.
As for stopping the count-down, maybe I'll set up a logic_relay entity for the count-down and disable it when the second button is "OnPressed".
With the first button, I'll "Enable" the logic_relay entity to start the count-down.
satchmo
member
2077 posts
396 snarkmarks
Registered: Nov 24th 2004
Location: Los Angeles, U.S.

Occupation: pediatrician
"The greatest thing you'll ever learn is just to love and be loved in return." -- Toulouse-Lautre, Moulin Rouge
Re: Bombing Effect
Posted by Naklajat on Thu Mar 1st at 10:01pm 2007

Naklajat
member
1137 posts
207 snarkmarks
Registered: Nov 15th 2004
Location: Austin, Texas
Occupation: Baron
Posted by Naklajat on Thu Mar 1st at 10:01pm 2007
The ideal way to do this would probably be using a math_counter and a logic_timer. I'm not 100% sure all of this will work because I haven't tested it, but it should all work as far as I can tell.
For a 10 second timer:
math_counter
Initial Value: 10
Minimum Legal Value: 0
Maximum Legal Value: 10
logic_timer
Start Disabled: Yes
Use Random Interval: No
Refire Interval: 1
Give the logic_timer an "OnTimer" output targeting the math_counter that subtracts 1.
Use the math_counter's "OnHitMin" output to enable the trigger_hurt, disable the logic_timer, set it's own value back to 10 with a short delay (don't want the counter to get reset, then have the timer fire before it's disabled
), and finally disable the trigger_hurt after your desired delay.
For the buttons:
To activate the countdown just enable the logic_timer, to abort the countdown disable the logic_timer and set the math_counter back to 10 (again after a short (0.5-ish) delay).
As for sounds:
You could use the activation button to start an alarm bell, klaxon, etc. and the math_counter's "OnHitMax" output to stop the alarm sound.
This part I'm least sure of, as I've not done anything with logic_case, just read the help. Anyway, to use the countdown sounds (ie 5 4 3 2 1), try having the math_counter fire an "OutValue" at a logic_case, and the logic_case fire at different ambient_generics for numbers. I think the ambient_generics could all use the same SourceEntityName to come from the same spot.
For a 10 second timer:
math_counter
Initial Value: 10
Minimum Legal Value: 0
Maximum Legal Value: 10
logic_timer
Start Disabled: Yes
Use Random Interval: No
Refire Interval: 1
Give the logic_timer an "OnTimer" output targeting the math_counter that subtracts 1.
Use the math_counter's "OnHitMin" output to enable the trigger_hurt, disable the logic_timer, set it's own value back to 10 with a short delay (don't want the counter to get reset, then have the timer fire before it's disabled
For the buttons:
To activate the countdown just enable the logic_timer, to abort the countdown disable the logic_timer and set the math_counter back to 10 (again after a short (0.5-ish) delay).
As for sounds:
You could use the activation button to start an alarm bell, klaxon, etc. and the math_counter's "OnHitMax" output to stop the alarm sound.
This part I'm least sure of, as I've not done anything with logic_case, just read the help. Anyway, to use the countdown sounds (ie 5 4 3 2 1), try having the math_counter fire an "OutValue" at a logic_case, and the logic_case fire at different ambient_generics for numbers. I think the ambient_generics could all use the same SourceEntityName to come from the same spot.
Naklajat
member
1137 posts
207 snarkmarks
Registered: Nov 15th 2004
Location: Austin, Texas
Occupation: Baron
=o
Re: Bombing Effect
Posted by satchmo on Fri Mar 2nd at 7:04am 2007

satchmo
member
2077 posts
396 snarkmarks
Registered: Nov 24th 2004
Location: Los Angeles, U.S.
Occupation: pediatrician
Posted by satchmo on Fri Mar 2nd at 7:04am 2007
I am having problem with the setup.
Would someone take a look at the small example map and let me know how to fix it?
The button in the darker room activates the bombing sequence, and the button in the green room de-activates the countdown.
The dark room turns red when the countdown begins, and a blinding flash indicates the beginning of trigger_hurt in the red room.
Thank you very much.
" SRC="images/smiles/icon_smile.gif">
Would someone take a look at the small example map and let me know how to fix it?
The button in the darker room activates the bombing sequence, and the button in the green room de-activates the countdown.
The dark room turns red when the countdown begins, and a blinding flash indicates the beginning of trigger_hurt in the red room.
Thank you very much.
satchmo
member
2077 posts
396 snarkmarks
Registered: Nov 24th 2004
Location: Los Angeles, U.S.

Occupation: pediatrician
"The greatest thing you'll ever learn is just to love and be loved in return." -- Toulouse-Lautre, Moulin Rouge
Re: Bombing Effect
Posted by Naklajat on Fri Mar 2nd at 2:12pm 2007

Naklajat
member
1137 posts
207 snarkmarks
Registered: Nov 15th 2004
Location: Austin, Texas
Occupation: Baron
Posted by Naklajat on Fri Mar 2nd at 2:12pm 2007
I think the reason it's not stopping the relay is that the output has already been triggered, and it's just waiting for the delay till it fires. That's the advantage of using a math_counter and logic_timer, you can abort the countdown and reset it at any point, because it only fires an output once it's reached 0.
I tested the math_counter/logic_timer/logic_case setup as I described, and it works without a hitch. The only other thing it needs is outputs to lock and unlock the buttons.
I tested the math_counter/logic_timer/logic_case setup as I described, and it works without a hitch. The only other thing it needs is outputs to lock and unlock the buttons.
Naklajat
member
1137 posts
207 snarkmarks
Registered: Nov 15th 2004
Location: Austin, Texas
Occupation: Baron
=o
Re: Bombing Effect
Posted by satchmo on Fri Mar 2nd at 9:54pm 2007

satchmo
member
2077 posts
396 snarkmarks
Registered: Nov 24th 2004
Location: Los Angeles, U.S.
Occupation: pediatrician
Posted by satchmo on Fri Mar 2nd at 9:54pm 2007
Thanks, BVS!
" SRC="images/smiles/icon_smile.gif">
satchmo
member
2077 posts
396 snarkmarks
Registered: Nov 24th 2004
Location: Los Angeles, U.S.

Occupation: pediatrician
"The greatest thing you'll ever learn is just to love and be loved in return." -- Toulouse-Lautre, Moulin Rouge
Re: Bombing Effect
Posted by Naklajat on Fri Mar 2nd at 11:10pm 2007

Naklajat
member
1137 posts
207 snarkmarks
Registered: Nov 15th 2004
Location: Austin, Texas
Occupation: Baron
Posted by Naklajat on Fri Mar 2nd at 11:10pm 2007
Here's the vmf I sent Satchmo, in case anyone else wants to look at the entity setup:
http://files.filefront.com/killTimerTest1zip/;6850650;;/fileinfo.html
EDIT: Changed download link.
http://files.filefront.com/killTimerTest1zip/;6850650;;/fileinfo.html
EDIT: Changed download link.
Naklajat
member
1137 posts
207 snarkmarks
Registered: Nov 15th 2004
Location: Austin, Texas
Occupation: Baron
=o
Re: Bombing Effect
Posted by satchmo on Sat Mar 3rd at 4:32am 2007

satchmo
member
2077 posts
396 snarkmarks
Registered: Nov 24th 2004
Location: Los Angeles, U.S.
Occupation: pediatrician
Posted by satchmo on Sat Mar 3rd at 4:32am 2007
Hmm...the VMF file is corrupted.
I cannot open it with Hammer.
I cannot open it with Hammer.
satchmo
member
2077 posts
396 snarkmarks
Registered: Nov 24th 2004
Location: Los Angeles, U.S.

Occupation: pediatrician
Re: Bombing Effect
Posted by Naklajat on Sat Mar 3rd at 12:41pm 2007

Naklajat
member
1137 posts
207 snarkmarks
Registered: Nov 15th 2004
Location: Austin, Texas
Occupation: Baron
Posted by Naklajat on Sat Mar 3rd at 12:41pm 2007
I don't know what happened, but I can't open it either.
I uploaded a working version and changed the download URL in my last post.
Sorry 'bout that.
I uploaded a working version and changed the download URL in my last post.
Sorry 'bout that.
Naklajat
member
1137 posts
207 snarkmarks
Registered: Nov 15th 2004
Location: Austin, Texas
Occupation: Baron
=o
Re: Bombing Effect
Posted by satchmo on Sun Mar 4th at 12:28am 2007

satchmo
member
2077 posts
396 snarkmarks
Registered: Nov 24th 2004
Location: Los Angeles, U.S.
Occupation: pediatrician
Posted by satchmo on Sun Mar 4th at 12:28am 2007
Thanks.
You the Baron!
You the Baron!
satchmo
member
2077 posts
396 snarkmarks
Registered: Nov 24th 2004
Location: Los Angeles, U.S.

Occupation: pediatrician
"The greatest thing you'll ever learn is just to love and be loved in return." -- Toulouse-Lautre, Moulin Rouge
Re: Bombing Effect
Posted by satchmo on Mon Mar 5th at 12:09am 2007

satchmo
member
2077 posts
396 snarkmarks
Registered: Nov 24th 2004
Location: Los Angeles, U.S.
Occupation: pediatrician
Posted by satchmo on Mon Mar 5th at 12:09am 2007
dm_vertico_beta4 is being playtested at:
GamingParents 16 Players Half Life 2 Deathmatch Server [209.247.83.150:27015]
Come and join the brawl!
GamingParents 16 Players Half Life 2 Deathmatch Server [209.247.83.150:27015]
Come and join the brawl!
satchmo
member
2077 posts
396 snarkmarks
Registered: Nov 24th 2004
Location: Los Angeles, U.S.

Occupation: pediatrician
"The greatest thing you'll ever learn is just to love and be loved in return." -- Toulouse-Lautre, Moulin Rouge
Re: Bombing Effect
Posted by reaper47 on Mon Mar 5th at 2:15am 2007
Posted by reaper47 on Mon Mar 5th at 2:15am 2007
Hey, nice map there, satchmo!
Add it to the profile!
" SRC="images/smiles/icon_smile.gif">
Add it to the profile!
Re: Bombing Effect
Posted by satchmo on Sun Mar 11th at 12:17am 2007

satchmo
member
2077 posts
396 snarkmarks
Registered: Nov 24th 2004
Location: Los Angeles, U.S.
Occupation: pediatrician
Posted by satchmo on Sun Mar 11th at 12:17am 2007
satchmo
member
2077 posts
396 snarkmarks
Registered: Nov 24th 2004
Location: Los Angeles, U.S.

Occupation: pediatrician
"The greatest thing you'll ever learn is just to love and be loved in return." -- Toulouse-Lautre, Moulin Rouge
1
© Snarkpit.net 2001 - 2023, about us, donate, contact
Snarkpit v6.1.0 created this page in 0.0228 seconds.

Snarkpit v6.1.0 created this page in 0.0228 seconds.



