Making AI Units attack other AI Units If They Are Nearby.

General talk about editing, cheating, and deprotecting maps.

Moderator: Cheaters

knightcyan
Newcomer
Posts: 9
Joined: May 19th, 2009, 8:29 pm

Making AI Units attack other AI Units If They Are Nearby.

Post by knightcyan »

I am currently having trouble figuring out how to make AI units like footman who walk to a destination i call path a in regions attack the enemie who also walk to path a if they are not standing still.
knightcyan
Newcomer
Posts: 9
Joined: May 19th, 2009, 8:29 pm

Re: Making AI Units attack other AI Units If They Are Nearby.

Post by knightcyan »

what i mean is i have a trigger that tells creeps to move to a certain region for the allys and the enemies and i want them to attack each other if they meet up with each other before or after they reach that destination.
User avatar
Syre
Forum Staff
Posts: 506
Joined: November 17th, 2008, 3:49 pm

Re: Making AI Units attack other AI Units If They Are Nearby.

Post by Syre »

Just make the creeps attack-move to the region instead of just move.

Code: Select all

Unit Group - Pick every unit in (Units in Region 000 <gen> owned by Neutral Hostile) and do (Unit - Order (Picked unit) to Attack-Move To (Center of (Playable map area)))


The action your looking for is "Unit - Issue order targeting a point"
Image
[=ryCgg=]
Senior Member
Posts: 152
Joined: October 5th, 2009, 7:31 am
Title: Taiwan, Singapore
Location: Here!? XD

Re: Making AI Units attack other AI Units If They Are Nearby.

Post by [=ryCgg=] »

knightcyan wrote:I am currently having trouble figuring out how to make AI units like footman who walk to a destination i call path a in regions attack the enemie who also walk to path a if they are not standing still.

knightcyan wrote:what i mean is i have a trigger that tells creeps to move to a certain region for the allys and the enemies and i want them to attack each other if they meet up with each other before or after they reach that destination.


Don't double post, use the edit button.

kthx.