Jump to content
Sign in to follow this  
MAJORdorMo

createUnit problems! AI won't attack!

Recommended Posts

Here is my code:

_N = markerPos "N";
_S = markerPos "S";
_E = markerPos "E";
_W = markerPos "W";

//creates AI HQ
_OpforHQ = createCenter east;

//creates the AI's groups
grpNorth = createGroup east;
grpSouth = createGroup east;
grpEast = createGroup east;
grpWest = createGroup east;

"RUS_Soldier1" createUnit [_N, grpNorth];
"RUS_Soldier1" createUnit [_N, grpNorth];
"RUS_Soldier1" createUnit [_N, grpNorth];
"RUS_Soldier1" createUnit [_N, grpNorth];

Now, the units spawn, but they don't attack! I can nip one in the leg and they won't attack! I can throw in Blufor AI that will kill them, but they won't fight back!

How do I get the units to fight?

Share this post


Link to post
Share on other sites

You need to use the setFriend command as well:

_N = markerPos "N";
_S = markerPos "S";
_E = markerPos "E";
_W = markerPos "W";

//creates AI HQ
_OpforHQ = createCenter east;

West setFriend [East,0];
East setFriend [West,0];

//creates the AI's groups
grpNorth = createGroup east;
grpSouth = createGroup east;
grpEast = createGroup east;
grpWest = createGroup east;

"RUS_Soldier1" createUnit [_N, grpNorth];
"RUS_Soldier1" createUnit [_N, grpNorth];
"RUS_Soldier1" createUnit [_N, grpNorth];
"RUS_Soldier1" createUnit [_N, grpNorth];

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  

×