Game Development Community

Why kork cant move if re-enable after dead

by Tuanlucky · in Torque Game Engine · 05/25/2006 (6:40 am) · 1 replies

I am trying the way respawn an AIplayer without delete them out of memory then re-create.
My method is:
function Armor::onDeath(%this, %obj, %state)
{
....
  %obj.schedule($CorpseTimeoutValue, "respawn", %obj,"Unused");
....
}
 function Armor::respawn(%this, %obj, %state)
{
    %obj.setDamageLevel(0);
    %obj.setDamageState("Enable");

    %obj.setMoveDestination("100 100 100", false);
}

The result is Kork wake up but always stand still.
Appreciate for explaination.

#1
07/11/2006 (8:32 am)
He probably is not set to the AI manager, investigate how the bot initally get his path and besure you are hooking him back in when he dies