Code: Select all
function Touch(actor Other)
{
if (Other == OrderObject)
AlarmDone();
}
Code: Select all
function Bump(actor Other)
{
local vector VelDir, OtherDir;
local float speed;
if ( Health
which is supposed to try to set the reached pawn as the new enemy. For example, on level Ruins, there is a SkaarjScout with mission to kill the Nali which opens the secret door. Sometimes, this Skaarj fails to accomplish his goal because of the aforementioned issue:
Suggested resolution:
Define ScriptedPawn.TriggerAlarm.Touch as follows:
Code: Select all
function Touch(actor Other)
{
if (Other == OrderObject)
{
AlarmDone();
if (IsAlivePawn(Pawn(Other)))
SetEnemy(Pawn(Other));
}
}
where IsAlivePawn is new suggested function defined as
Code: Select all
final static function bool IsAlivePawn(Pawn Pawn)
{
return bool(Pawn) && !Pawn.bDeleteMe && Pawn.Health > 0;
}
in Engine.Actor.