Slight problem with adding/changing turret lines

Avatar
Comedyninja
9 Posts
Posted Nov 04, 2011
Today I was snooping around the scripts folder and stumbled into the discovery that in the "npc_sounds_turret_portal" script, some of the lines have been commented out, like so:

"wave"         "npc/turret_floor/turret_active_2.wav"
      //"wave"         "npc/turret_floor/turret_active_3.wav"

So of course I un-commented them to see if it would get the sounds to play in-game. It didn't. Every time I'd start up a map with turrets in it, the map would load for a few seconds, and then crash to the main menu with the console up. Does anyone have an idea as to why Valve commented out these particular lines, or how changing the file (a copy of the original, don't worry) can cause the map to crash?

On the other hand, I added in all of the alternate lines contained in the "root/sound/npc/turret" folder to their respective sections in (my copy of) the "npc_sounds_turret" script without any problems. Hearing the turrets yell, "glorious freedom!" when they're launched off a faith plate never gets old! :lol:

Advertisement
Registered users don’t see ads! Register now!
Avatar
nathanle1406
41 Posts
Posted Nov 04, 2011
Replied 1 hour later

Comedyninja wrote:
On the other hand, I added in all of the alternate lines contained in the "root/sound/npc/turret" folder to their respective sections in (my copy of) the "npc_sounds_turret" script without any problems. Hearing the turrets yell, "glorious freedom!" when they're launched off a faith plate never gets old! :lol:

that sounds cool but no matter how hard i try i cant find root/sound/npc/turret could you help?

anyway, on your problem, is there any errors in the console? maybe they are broken/corrupted sound files?

Avatar
Will T.
163 Posts
Posted Nov 04, 2011
Replied 2 hours later
Are you sure those files exist in the Portal 2 files? They might be missing, hence the lines referencing them being commented out.

Other than that, I dunno, except maybe broken code that prevents that particular sound from loading properly.

Avatar
Comedyninja
9 Posts
Posted Nov 05, 2011
Replied 3 hours later
@Will yeah they're all there... I played all of them commented files straight from GCFScape to make sure that they all worked.

@nathan You use the program GCFScape (http://nemesis.thewavelength.net/index.php?p=26) to open the pak01_dir file found in the "portal2/portal2" folder. The root of that file is the "root/" in the file path I talked about. Does that answer your question?

NOTE: If you're going to mess with any script files, the first thing to do is as soon as you open the file, immediately save the file under a different name, like "npc_sounds_turret_original" and then edit the file. Once you're done, save it under the name the original file had, so "npc_sounds_turret". You MUST keep a copy of the original file so that if you mess up your custom one, you have something to go back to!

Avatar
nathanle1406
41 Posts
Posted Nov 05, 2011
Replied 13 hours later
thanks, now that i know what you did i tryed the same thing, i am able add different sounds to npc_sounds_turret, i havn't heard any of them yet, but the game doesnt crash....

currently im uncommenting the lines in npc_sounds_turret_portal to see what they do

EDIT: i was able to un-comment the lines, i can load maps with turrets just fine, but so far i havnt heard any new sounds.....

Advertisement
Registered users don’t see ads! Register now!
Avatar
MasterLagger
1,695 Posts
Posted Nov 06, 2011
Replied 17 hours later
I used alt. turret lines by using ambient_generic and a trigger. I did this in my map, "Aperture Aquatic Testing Center 2" When the player hit the trigger, the turrets that are stuck in a turret box will say something funny like, "Help! Being squished!"