Jump to content
Sign in to follow this  
vostov

How do I make an AI follow the player without being in his squad?

Recommended Posts

I figure I could set him on stealth and hold fire... so he'd fire when fired upon letting the player (who is a sniper) control the engagements.

I want the ''spotter'' to just kinda be there to help the player. I'm doing this so noobs don't get intimidated by controlling the AI teammate.

How could I do this?

Share this post


Link to post
Share on other sites

[] spawn {
 while {alive spotter} do {
   spotter move getpos player;
   sleep 5;
 };
};

Basic idea, could add some distance checking as well.

  • Like 1

Share this post


Link to post
Share on other sites

i guess i need to put this in an init file? sqf? or in the init part of the unit box.

Share this post


Link to post
Share on other sites

I think you have to put this in a text file in the mission's folder in your profile fodler (in documents). Name it follow.sqf or whatever you like, then type this in a unit's init line: _script = this execVM "follow.sqf"

Tried it, works perfectly.

Edited by ziiip

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×