For direct access use https://forums.oldunreal.com
It's been quite a while since oldunreal had an overhaul, but we are moving to another server which require some updates and changes. The biggest change is the migration of our old reliable YaBB forum to phpBB. This system expects you to login with your username and old password known from YaBB.
If you experience any problems there is also the usual "password forgotten" function. Don't forget to clear your browser cache!
If you have any further concerns feel free to contact me: Smirftsch@oldunreal.com

Issue #69. Potentially missing call to SetEnemy in state ScriptedPawn.TriggerAlarm

Report bugs, read about fixes, new features and ask questions about the Unreal 227 patch here. Place comments and commit suggestions.

Moderator: ividyon

Post Reply
User avatar
Masterkent
OldUnreal Member
Posts: 1434
Joined: Fri Apr 05, 2013 12:41 pm

Issue #69. Potentially missing call to SetEnemy in state ScriptedPawn.TriggerAlarm

Post by Masterkent »

When a ScriptedPawn is in state TriggerAlarm and reaches the target pawn, pursuing the target pawn may be finished by calling Touch

Code: Select all

      function Touch(actor Other)
      {
            if (Other == OrderObject)
                  AlarmDone();
      }
without calling Bump

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.
Post Reply
  • Similar Topics
    Replies
    Views
    Last post

Return to “Unreal 227”