Turret Sounds

Avatar
Spam Nugget
492 Posts
Posted Feb 05, 2012
The mod im working on is going to contain both standard and skeleton (broken/crap) turrets. I can make normal turrest appear as broken no dramas, but i cannot get thm to sound like broken turrets.
I know the sounds they make are controled by the script npc_sounds_turret_portal.txt, which is referenced by the script game_sounds_mainfest.txt, i can change the sounds the turrets make, i can refernece new soundscripts.
but i need to be able to run both broken and standard turret sounds, so i cant just overwrite the npc_sounds_turret_portal with broken sounds.
So is it possible to make a new soundscript and change to it on trigger? Is there any other way to do this?
Help would me much apreciated!
Advertisement
Registered users don’t see ads! Register now!
Avatar
ChickenMobile
2,460 Posts
Posted Feb 05, 2012
Replied 4 minutes later
You could always try gagging the broken turrets and use ambient generics to play instead, I doubt this is a good idea though...
Avatar
spongylover123
944 Posts
Posted Feb 05, 2012
Replied 32 minutes later
you can override it with a new version of npc_sounds_turret_portal.txt
but putting it in a pak01_dir.vpk in a portal2_dlc3 folder.
Avatar
Spam Nugget
492 Posts
Posted Feb 05, 2012
Replied 1 hour later

chickenmobile wrote:
You could always try gagging the broken turrets and use ambient generics to play instead, I doubt this is a good idea though...

Yeah ive considered doing this, but id rather not have to, as it wil be hard to get right and also the turrets dont have all the outputs necessay to respond like the standard ones do.

spongylover123 wrote:
you can override it with a new version of npc_sounds_turret_portal.txt
but putting it in a pak01_dir.vpk in a portal2_dlc3 folder.

I know i can overwrite it, the problem is that i want to be able to use standard and broken turrets as well. (though not in the same map)

Avatar
spongylover123
944 Posts
Posted Feb 05, 2012
Replied 1 hour later
Isnt the broken turret sounds in a vcd?
Or make your own vcd with the broken turret sounds?

P.S I found out a way to make a turret's laser follow you, but not shoot you. Parent an env_laser to a dynamic override

Avatar
Spam Nugget
492 Posts
Posted Feb 06, 2012
Replied 7 hours later
I think the turret sounds are iin a vcd, but it is geared for the specific circumstances you encouter them in the game. Im not sure exactly how to make a new vcd thta would work, i dont know much about choreography. would i be able to make a vcd that allows the turret to respond to the same stimuli as the normal turrets? how would i go about doing that?
And thanks for finding out about the laser haha, id pretty much given up on that
Avatar
262LetsPlay
51 Posts
Posted Feb 06, 2012
Replied 9 hours later
You just have to set the flag "Out of ammo", and add the keyvalue "ShootAtMovingObjects" (set to 1). This puts the turret in defective mode, but it still aims. Than you put "logic_choreographed_scene" on the output "OnDeploy". An example could be the vcd "finale02_turret_return_defect_fail15". As target in the scene entity you have to define the turret, otherwise it won't play. There are outputs for all situations a turret can be in. (for "OnRetire" you have to use a logic_branch, because its fired at activating and deactivating). Hope that helped. Maybe I do an instance for that.
Avatar
Spam Nugget
492 Posts
Posted Feb 06, 2012
Replied 1 hour later
yeah its olay im not trying to create a nonworking turret now, that was a reference to another post. and i know i could use i/o to run some lines, but one its going to be really messy to do, especially for miltiple turrets and two turrets dont fire all the outputs i would need to make then respond to every stimuli the normal ones do.
Avatar
Rand0mNumbers
76 Posts
Posted Feb 07, 2012
Replied 1 day later
I've been messing with defective turrets for my latest map. I suggest rummaging through sp_a2_bts4.
As usual, I can't get ambient_generics working right and, in this case, Hammer won't preview the sounds.

So, I created a gagged turret running choreo/turret_factory_working.nut. Next, used a logic_script named "turret_vo_manager" running choreo/turret_vo_manager.nut. The logic_script's name is hardcoded into the scripts. Woo...

From there, I used default turret i/o (OnTipped, OnPhysGunPickup, etc) to run various functions. The ones I found that work off the bat are: MalfunctioningTurretSneakBy(), grabbedDefect(), and MalfunctioningTurretFling().

Doing this will have them randomly speak a decent chunk of the defective turret lines. It just sounds odd when you hit a dryfire line as it is shooting you.

EDIT:

Oh, if you tip the turret over and it retires, you have to force it to fire a bullet, retip it, pick it up before it retires, and pickup/drop it on its feet a few times to get it to speak again. Yeah, I have no idea what's going on there.

Advertisement
Registered users don’t see ads! Register now!
Avatar
Spam Nugget
492 Posts
Posted Feb 08, 2012
Replied 1 day later
Thanks muchly for that, ive had a quick look and it seems to do most of what I want, Ill see if I can get it to do the rest now.