Home   Help Search Login Register  

Author Topic: Make AI chase player  (Read 2122 times)

0 Members and 1 Guest are viewing this topic.

Offline DLEGION

  • Members
  • *
Make AI chase player
« on: 24 Jun 2012, 23:05:26 »
Hello! ARMA 2 OA question:

i really need a way to make an AI unit chase another unit (the player in this case), walking (not running), with no fear (no crouch, no fleeing away) !

its not a zombie....it's just a terminator!

really thanks for your help!

Offline Worldeater

  • Former Staff
  • ****
  • Suum cuique
Re: Make AI chase player
« Reply #1 on: 01 Jul 2012, 18:57:55 »
You could try something like this:

Code: [Select]
// steal the terminators brain and limit his speed
terminator disableAI "FSM";
terminator forceSpeed 1;

private ["_handle"];
_handle = player spawn {  // create a background script...
  waitUntil {  // ... that runs as long as the terminator is alive...
    terminator doMove getPos _this;  // ... and makes the him chase the player.
    sleep 1;
    not alive terminator;
  };
};

try { return true; } finally { return false; }