Bombing Effect

Bombing Effect

Re: Bombing Effect Posted by satchmo on Thu Mar 1st 2007 at 7:01pm
satchmo
2077 posts
Posted 2007-03-01 7:01pm
satchmo
member
2077 posts 1809 snarkmarks Registered: Nov 24th 2004 Occupation: pediatrician Location: Los Angeles, U.S.
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.
"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 2007 at 7:27pm
Natus
570 posts
Posted 2007-03-01 7:27pm
Natus
member
570 posts 76 snarkmarks Registered: Jan 28th 2005 Location: Denmark
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.
Re: Bombing Effect Posted by satchmo on Thu Mar 1st 2007 at 9:23pm
satchmo
2077 posts
Posted 2007-03-01 9:23pm
satchmo
member
2077 posts 1809 snarkmarks Registered: Nov 24th 2004 Occupation: pediatrician Location: Los Angeles, U.S.
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.
"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 2007 at 10:01pm
Naklajat
1137 posts
Posted 2007-03-01 10:01pm
Naklajat
member
1137 posts 384 snarkmarks Registered: Nov 15th 2004 Occupation: Baron Location: Austin, Texas
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 :smile: ), 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.

o

Re: Bombing Effect Posted by satchmo on Fri Mar 2nd 2007 at 7:04am
satchmo
2077 posts
Posted 2007-03-02 7:04am
satchmo
member
2077 posts 1809 snarkmarks Registered: Nov 24th 2004 Occupation: pediatrician Location: Los Angeles, U.S.
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. :smile:
"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 2007 at 2:12pm
Naklajat
1137 posts
Posted 2007-03-02 2:12pm
Naklajat
member
1137 posts 384 snarkmarks Registered: Nov 15th 2004 Occupation: Baron Location: Austin, Texas
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.

o

Re: Bombing Effect Posted by satchmo on Fri Mar 2nd 2007 at 9:54pm
satchmo
2077 posts
Posted 2007-03-02 9:54pm
satchmo
member
2077 posts 1809 snarkmarks Registered: Nov 24th 2004 Occupation: pediatrician Location: Los Angeles, U.S.
Thanks, BVS! :smile:
"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 2007 at 11:10pm
Naklajat
1137 posts
Posted 2007-03-02 11:10pm
Naklajat
member
1137 posts 384 snarkmarks Registered: Nov 15th 2004 Occupation: Baron Location: Austin, Texas
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.

o

Re: Bombing Effect Posted by satchmo on Sat Mar 3rd 2007 at 4:32am
satchmo
2077 posts
Posted 2007-03-03 4:32am
satchmo
member
2077 posts 1809 snarkmarks Registered: Nov 24th 2004 Occupation: pediatrician Location: Los Angeles, U.S.
Hmm...the VMF file is corrupted.

I cannot open it with Hammer.
Re: Bombing Effect Posted by Naklajat on Sat Mar 3rd 2007 at 12:41pm
Naklajat
1137 posts
Posted 2007-03-03 12:41pm
Naklajat
member
1137 posts 384 snarkmarks Registered: Nov 15th 2004 Occupation: Baron Location: Austin, Texas
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.

o

Re: Bombing Effect Posted by satchmo on Sun Mar 4th 2007 at 12:28am
satchmo
2077 posts
Posted 2007-03-04 12:28am
satchmo
member
2077 posts 1809 snarkmarks Registered: Nov 24th 2004 Occupation: pediatrician Location: Los Angeles, U.S.
Thanks.

You the Baron!
"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 2007 at 12:09am
satchmo
2077 posts
Posted 2007-03-05 12:09am
satchmo
member
2077 posts 1809 snarkmarks Registered: Nov 24th 2004 Occupation: pediatrician Location: Los Angeles, U.S.
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!
"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 2007 at 2:15am
reaper47
2827 posts
Posted 2007-03-05 2:15am
reaper47
member
2827 posts 1921 snarkmarks Registered: Feb 16th 2005 Location: Austria
Hey, nice map there, satchmo!
Add it to the profile! :smile:
Why snark works.
Re: Bombing Effect Posted by satchmo on Sun Mar 11th 2007 at 12:17am
satchmo
2077 posts
Posted 2007-03-11 12:17am
satchmo
member
2077 posts 1809 snarkmarks Registered: Nov 24th 2004 Occupation: pediatrician Location: Los Angeles, U.S.
Hey, nice map there, satchmo!
Add it to the profile! :smile:
Done!
"The greatest thing you'll ever learn is just to love and be loved in return." -- Toulouse-Lautre, Moulin Rouge