| closedTriggered VOX spoken announcement using map entities? |
| Started by RichNagel on 03-09-2012, 04:00 AM |
Threads: 8
Joined: Jan 2012
(I posted this over in the Steam Counter-Strike and Half-Life forums, but figured I'd post it here as well... as I have a good hunch that the same method (if it's possible) for Day of Defeat would ALSO apply to Counter-Strike)rnrnrnHere's what I'm trying to do...rnrnrnI have a map with the following entities:rnrn
{rn"model" "*104"rn"material" "0"rn"health" "1"rn"renderamt" "50"rn"rendermode" "2"rn"rendercolor" "0 0 0"rn"explosion" "1"rn"explodemagnitude" "384"rn"target" "reactorcorebreached"rn"classname" "func_breakable"rn}rnrn{rn"origin" "-1174 177 -264"rn"targetname" "reactorcorebreached"rn"message" "Warning! The reactor core chamber has been breached!"rn"channel" "1"rn"effect" "0"rn"holdtime" "5"rn"fadeout" "4"rn"fadein" "0.05"rn"color2" "240 110 0"rn"color" "100 100 100"rn"y" "-1"rn"x" "-1"rn"spawnflags" "1"rn"classname" "game_text"rn}rnrnIn the map, model 104 is the glass on the front of a box (a reactor chamber). When model 104 is broken, the text message in the second entitiy is displayed "Warning! The reactor core chamber has been breached!".rnrnrnI'm trying to ALSO trigger an audible spoken message, using the standard "sentences/VOX" features and sound files included with Half-Life (which, of course, is loaded and accessible when playing Counter-Strike).rnrnI've read things about the class names "sentence" and "scripted_sentence" (as well as using "ambient_generic", but so far have had no luck.rnrnrnAn example from Half-Life's "Sentences.txt" file would be:rnrnC2A4_1 bizwarn bizwarn. alert. biological containment breach detectedrnrnI've found that the game includes the correct sound files to "speak" the message that I want, something like:rnrnbizwarn bizwarn. warning. the reactor core chamber has been breached.rnrn...as they're included with Half-Life, in the game's GCF; "ValveSoundVOX*.wav".rnrnrnSo... any idea of how to get the game to "talk" and speak the message (and heard by all players), triggered when model 104 is broken?Threads: 8
Joined: Jan 2012
Figured it out on my own :)rnrnHere's what I did:rnrn
{rn"model" "*104"rn"material" "0"rn"health" "1"rn"renderamt" "50"rn"rendermode" "2"rn"rendercolor" "0 0 0"rn"explosion" "1"rn"explodemagnitude" "384"rn"delay" "0"rn"target" "reactorcorebreached"rn"classname" "func_breakable"rn}rn{rn"origin" "0 0 -150"rn"targetname" "reactorcorebreached"rn"message" "Warning! The reactor core chamber has been breached!"rn"channel" "2"rn"effect" "0"rn"holdtime" "10"rn"fadeout" "4"rn"fadein" "0.05"rn"color2" "15 142 136"rn"color" "197 228 222"rn"y" "-1"rn"x" "-1"rn"spawnflags" "1"rn"classname" "game_text"rn}rn{rn"origin" "0 0 -150"rn"warning1" 0.000rn"warning2" 0.888rn"warning3" 1.776rn"warning4" 2.664rn"warning5" 3.552rn"warning6" 4.116rn"warning7" 4.475rn"warning8" 5.177rn"warning9" 5.907rn"warning10" 6.624rn"warning11" 7.213rn"warning12" 7.620rn"targetname" "reactorcorebreached"rn"classname" "multi_manager"rn}rn{rn"origin" "0 0 -150"rn"health" "10"rn"targetname" "warning1"rn"message" "vox/bizwarn.wav"rn"spawnflags" "57"rn"classname" "ambient_generic"rn}rn{rn"origin" "0 0 -150"rn"health" "10"rn"targetname" "warning2"rn"message" "vox/bizwarn.wav"rn"spawnflags" "57"rn"classname" "ambient_generic"rn}rn{rn"origin" "0 0 -150"rn"health" "10"rn"targetname" "warning3"rn"message" "vox/bizwarn.wav"rn"spawnflags" "57"rn"classname" "ambient_generic"rn}rn{rn"origin" "0 0 -150"rn"health" "10"rn"targetname" "warning4"rn"message" "vox/bizwarn.wav"rn"spawnflags" "57"rn"classname" "ambient_generic"rn}rn{rn"origin" "0 0 -150"rn"health" "10"rn"targetname" "warning5"rn"message" "vox/warning.wav"rn"spawnflags" "57"rn"classname" "ambient_generic"rn}rn{rn"origin" "0 0 -150"rn"health" "10"rn"targetname" "warning6"rn"message" "vox/the.wav"rn"spawnflags" "57"rn"classname" "ambient_generic"rn}rn{rn"origin" "0 0 -150"rn"health" "10"rn"targetname" "warning7"rn"message" "vox/reactor.wav"rn"spawnflags" "57"rn"classname" "ambient_generic"rn}rn{rn"origin" "0 0 -150"rn"health" "10"rn"targetname" "warning8"rn"message" "vox/core.wav"rn"spawnflags" "57"rn"classname" "ambient_generic"rn}rn{rn"origin" "0 0 -150"rn"health" "10"rn"targetname" "warning9"rn"message" "vox/chamber.wav"rn"spawnflags" "57"rn"classname" "ambient_generic"rn}rn{rn"origin" "0 0 -150"rn"health" "10"rn"targetname" "warning10"rn"message" "vox/has.wav"rn"spawnflags" "57"rn"classname" "ambient_generic"rn}rn{rn"origin" "0 0 -150"rn"health" "10"rn"targetname" "warning11"rn"message" "vox/been.wav"rn"spawnflags" "57"rn"classname" "ambient_generic"rn}rn{rn"origin" "0 0 -150"rn"health" "10"rn"targetname" "warning12"rn"message" "vox/breached.wav"rn"spawnflags" "57"rn"classname" "ambient_generic"rn}rnrn...and it works perfectly :)rnrnBTW, what this is for is my own humble conversion of Half-Life's "Rapid Core" deathmatch map for use with Counter-Strike and Counter-Strike:Condition Zero. I had converted the map a while back, complete with two bomb sites, additional ambient sound effects, and a proper "overview" map.rnrnI also had created (heavily edited) a Condition Zero bot navigation mesh file for the map (so you could play the map with the CZ bots).rnrnRecently I did some more editing to the NAV meshes (adding location "place names" for the players' and bots' radio chatter), and was REALLY GETTING TIRED of the bots (or my human buddies) breaking the glass in the floor in some of the rooms... in Counter-Strike you and the bots will get trapped in those holes in the floor (unless "sv_gravitiy" is set low).rnrnSo, I figured out how to make the glass unbreakable, and then thought, hmmmm... might be kind of cool if you could break the glass housing that spinning thing in what I call the "reactor core chamber".rnrnThen, I managed to get a "game_text" message displayed when the glass was broken, as well as a HUGE explosion to kill off anyone that might be in that room.rnrnLast ideas was the above... that announcement voice stating that the reactor chamber had been breached.rnrnWORKS LIKE A CHAMP NOW! :)Threads: 33
Joined: Sep 2008
Niice man!nnI could use this in my maps, if you don't mind? Where is your server at, I would like to come and check it out. I sent an invitation under a different alias to your steam friends :) I'm interested in your ideas and work arounds.
Threads: 8
Joined: Jan 2012
Niice man! I could use this in my maps, if you don't mind?rnrnFeel free to do so, no permissions required :)rnrnrn
I sent an invitation under a different alias to your steam friends :) I'm interested in your ideas and work arounds.rnrnCool. I justed accepted your friend request, and sent an invitation to you for our meager little DoD/CS/CS:CZ clan, the Swamp Buzzards Clan -> http://steamcommunity.com/groups/SwampBuzzardsClan :)rnrnrn
Where is your server at, I would like to come and check it out.rnrnI usually run a listen server (with password). Shoot me an email (or PM) for the IP and PW :)rnrnrnrnrnP.S. For anyone interested, the updated version of my Half-Life to Counter-Strike and Counter-Strike: Condition Zero "Rapid Core" map conversion:rnrnhttp://www.17buddies.net/17b2/View/Map/72786/de_weeds_rapidcore.html
Threads: 23
Joined: Aug 2007
pretty nice work
Threads: 8
Joined: Jan 2012
BTW... for anyone interested, a simple and short little YouTube video showing "de_Weeds_RapidCore" in action:rnrnhttp://www.youtube.com/watch?v=2Y3Qk6wUnpE
Threads: 3
Joined: Feb 2005
Hi Rich,rnrnGood job figuring it out.rnJust wondering what the numbers in the multimanager do?
Threads: 8
Joined: Jan 2012
Just wondering what the numbers in the multimanager do?rnrnThe numbers are the delay (in seconds) of how long to wait before the next sound file plays. Without the delay, ALL of the WAV files play at the exact same time <grin>.rnrnIf the numbers are too high, the spoken words are spaced too far apart. If they are too small, one spoken word will "run into" (overlap) the next one.rnrnThe way I determined the best delays was to simply load each sound file into my WAV editor of choice (GoldWave), and check the duration of each file.rnrnThen, I simply added up the durations; one at a time; to come up with those numbers.rnrnThe result sounds fairly "natural" (as far as when each word sound effect is heard on the game), although, not QUITE as natural as when using the predefined "Sentences.txt" method.rnrnIf you load the map within the game; press the little button to the right of the sliding door at the CT's spawn area. THAT one uses the predefined "Sentences.txt" method... while the reactor-core-breached message sound uses my "rig" above.rnrnYou can hear the difference between the two methods by listening to the above (note that the button trigger thing isn't shown/heard in my little video... only the reactor breached message).

