Call of Duty Scripting

This is a brief look at a scripting project that I am currently turning into a full level.  I really wanted to script a friendly dog that helps clear rooms and walk through mine fields.  In CoD4, dogs are enemies, so the first step was making him friendly which was easy, all I had to do was change the dog’s faction from “axis” to “allies” in the dog gsc script.

The next step was I wanted the dog to not be insta killed when downing an enemy (when a dog tackles a person there is a 50/50 chance of who survives).  This took some searching but I finally found the gsc file, which I changed so that the dog will win the battle 100% of the time.

The last step was making sure a magic bullet shield was on the dog so he couldn’t die by gunfire.  In my level gsc file in main, I do a search for entities with the targetname of “doggie”, I then apply a shield to the dog making him invulnerable to bullets.

some_text

Note green cross-hairs and me not dying.

some_text

Dog tackling enemy player and successfully winning the battle.