Game Development Community

Ch 7 - AI bad guy keeps shooting at me

by Jesse P · in Torque Game Engine · 11/17/2007 (12:20 am) · 2 replies

Hey I got the AIguard to work from chapter 7 and I gave him the ak47 but when he dies his dead body still shoots at me for a good three or four seconds, how do I make it stop shooting at me as soon as I kill him?
Thanks in advance

#1
11/17/2007 (6:20 pm)
FIXED IT!
I added the following to the player2.cs:

function Player::playDeathAnimation(%this)
{
if (%this.deathIdx++ > 11)
%this.attention = 0;
%this.deathIdx = 1;
%this.setActionThread("Death" @ %this.deathIdx);
}


// added %this.attention = 0;
#2
11/17/2007 (8:09 pm)
It's great that you fixed it, but please don't post the same thing 3 times, it's just not very polite.