Glados Death Responses

Avatar
Totors
8 Posts
Posted Apr 08, 2012
Any way to make Glados say stuff in co-op when the player falls into acid or dies?

I already have the 'mp_coop_glados_ents' instance in the map but it doesn't trigger anything. Is there a script that allows you to do this?

Advertisement
Registered users don’t see ads! Register now!
Avatar
ChickenMobile
2,460 Posts
Posted Apr 09, 2012
Replied 7 hours later
Decompiling is your friend.

Valve uses a generic_actor called @glados which plays various scene files from glados_coop.nut. When the player dies "BotDeath(player,dmgtype)" activates.

function BotDeath(player,dmgtype)
{
   local curTime=Time()
   if (curTime-LastDeathTime<10){
      return
   }
   LastDeathTime=Time()
      
   if (curMapName == "mp_coop_tbeam_polarity3" && mp_coop_tbeam_polarity3deathblue==1 && player== coopBlue){      
      mp_coop_tbeam_polarity3deathblue=2
      GladosPlayVcd(1322)   
      return
   }
   ....

Inside that current function there is a number of different if statements which will make GLaDOS speak depending on who dies and where. (e.g. in mp_coop_rat_maze there is a script function called to tell if the player is in the maze or not and if they were crushed)

Your options here are:
- Manually play GLaDOS' sounds through ambient_generics whenever your players die- Pass through your own scene commands GladosPlayVcd(*int) function, through @glados's RunScriptCode output- Make your own custom Glados.nut and put in your GladosPlayVcd(int*) based on your mapname- Find the scene you want to play and use a logic_choreographic_scene