Game Development Community

AiPlayer and state

by Ryan Ackley · in Torque Game Engine · 02/19/2002 (3:46 pm) · 3 replies

Anyone know if the aiplayer class has a isAlive() member function or something to that extent? Im working on some basic Ai routines, but the code breaks if i kill one of my bots. Kind of silly, not being able to kill them :)
ryan

#1
02/19/2002 (11:08 pm)
You could just check if the bot object still exists:
if(isObject($myBot)){
...
}
// else he's dead
#2
02/20/2002 (4:27 am)
hrm.. i do that, but it still locks up when i call that function if hes dead. anyone got any ideas on why?
ryan
#3
05/11/2002 (6:09 am)
their is an function AIPlayer::ondeath in aiplayer.cs ... you could just toggle a bool % to say he's dead *shrug*