- Joined
- May 3, 2018
- Messages
- 3
Hi guys,
I'm going to make AI stick together by lead them to other ally's army.
I have made every unit of AI follow their army or their heroes. It worked pretty good.
But I don't know how to get ally's army/heroes location. I tried these script below but AI just go to somewhere.
I just use ally_loc and hero_ally_loc that available in the original script but it didn't work.
How can I get location from ally's army and ally's heroes?
I'm going to make AI stick together by lead them to other ally's army.
I have made every unit of AI follow their army or their heroes. It worked pretty good.
JASS:
set u = FirstOfGroup(g)
......
// Follow their army
call IssuePointOrder(u, "move", GetLocationX(army_loc[main_army]), GetLocationY(army_loc[main_army]))
// Follow their heroes
set major_hero = GetMajorHero()
call IssuePointOrder(u, "move", GetUnitX(major_hero), GetUnitY(major_hero))
But I don't know how to get ally's army/heroes location. I tried these script below but AI just go to somewhere.
JASS:
set u = FirstOfGroup(g)
......
call IssuePointOrder(u, "move", GetLocationX(ally_loc), GetLocationY(ally_loc))
call IssuePointOrder(u, "move", GetLocationX(hero_ally_loc[1]), GetLocationY(hero_ally_loc[1]))
I just use ally_loc and hero_ally_loc that available in the original script but it didn't work.
How can I get location from ally's army and ally's heroes?