Slight problem with adding/changing turret lines
Quote from Comedyninja on November 4, 2011, 7:40 pmToday 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:
- Code: Select all
"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!
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:
- Code: Select all
"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!
Quote from nathanle1406 on November 4, 2011, 8:50 pmComedyninja 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!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?

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?
Quote from Will T. on November 4, 2011, 10:55 pmAre 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.
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.
Quote from Comedyninja on November 5, 2011, 2:25 am@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!
@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!
Quote from nathanle1406 on November 5, 2011, 3:51 pmthanks, 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.....
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.....
Quote from MasterLagger on November 6, 2011, 9:21 amI 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!"
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!"
My Work
[spoiler]Maps:
Revenge of the Angry Turrets
Capture the Cube [Co-op]
Capture the Cube 2 [Co-op]
TPWEGTH Sample Map
Aperture Aquatic Testing Center
Aperture Aquatic Testing Center 2
Aperture Time Testing Center
ML's Halloween Trick - 1000 downloads!
ML's Halloween Treat
ML's Combination - 1000 downloads!
ML's Jailbreak Labyrinth
ML's Tricky Teamwork [Co-op]
WIP:
"Capture the Cube 3"
Workshop Maps Link: http://steamcommunity.com/profiles/76561198008890579/myworkshopfiles/[/spoiler]