Turret - "You stole my cupcake!!!"

Avatar
MasterLagger
1,695 Posts
Posted Jul 02, 2011
How could I change what a turret says? If possible, I want to change what turrets say. One of the lines I want them to say is "You stole my cupcake!" and then shoots at you. Any advice or ideas would be most helpful.
Advertisement
Registered users don’t see ads! Register now!
Avatar
ChickenMobile
2,460 Posts
Posted Jul 02, 2011
Replied 10 minutes later

MasterLagger wrote:
How could I change what a turret says? If possible, I want to change what turrets say. One of the lines I want them to say is "You stole my cupcake!" and then shoots at you. Any advice or ideas would be most helpful.

The randomization death/targetlock/targetlost/fall voice of the turret is probably done through some kind of Vscript.
If you look for the right script, you can add your own voice entry (of course not editing Valve's file, copy and paste) and then adding it into the vpk when you are done.

I might see if I can find where it is.

EDIT: The script is Portal 2/Portal2/scripts/npc_sounds_turret_portal.txt and it uses the same format for a random wave as it does for a soundscape, so it probably isn't too hard to edit. Remember that if you are to edit the txt file, make sure that you keep the original as a backup AND you have to restart portal for the .txt to change it's effects.

Avatar
Vordwann
767 Posts
Posted Jul 02, 2011
Replied 35 minutes later
I think a fun thing to do would be the "Life of a Turret" machinima idea... A.K.A. On engage: "Oh look. Another one." and when the target is lost, "What should I say?" [Other Turret:] "Say, 'I see you.'"
Avatar
ChickenMobile
2,460 Posts
Posted Jul 03, 2011
Replied 1 hour later

Vordwann wrote:
I think a fun thing to do would be the "Life of a Turret" machinima idea... A.K.A. On engage: "Oh look. Another one." and when the target is lost, "What should I say?" [Other Turret:] "Say, 'I see you.'"

That would be kinda cool :biggrin: but this would require more than just adding new random sounds into the text file. You would need to create a scripted sound sequence, where the different turrets act differently on the same scene, maybe activated on what they are named. (i.e. use the entity groups in a logic_script to refer to your specific turrets).

I'm not saying that it would be that difficult, just learning the syntax of w/e language Valve uses for their scripts would be if you haven't programmed or scripted before.

I could try and replicate this sometime, when I'm bothered :wink:

Advertisement
Registered users don’t see ads! Register now!
Avatar
MasterLagger
1,695 Posts
Posted Jul 03, 2011
Replied 9 hours later
Hmm... this sounds challenging. Oh well, who said it would be easy?