- Joined
- May 7, 2020
- Messages
- 24
I have a tug of war-type map and face a small problem: some units in waves go to different lanes, sometimes even to the furthest away. I want to know if there is a way to fix this so they follow the same path, at least to a certain point, and I don't want to do it by blocking the path with rocks and trees. Here is the JASS script for AI.
JASS:
globals
integer user = 0
integer SKELETON_KNIGHT = 'h60T'
integer DEATH_GUARD = 'u606'
integer BUTCHER = 'u601'
integer HIGH_PLAGUER = 'u603'
integer NECROMANCER = 'u604'
integer HERO = 'U609'
endglobals
function main takes nothing returns nothing
call CampaignAI(BURROW,null)
call PrepFullSuicide()
loop
loop
exitwhen CommandsWaiting() == 0
set user = GetLastCommand()
call PopLastCommand()
endloop
call SuicideUnitB(DEATH_GUARD,user)
call SuicideUnitB(SKELETON_KNIGHT,user)
call SuicideUnitB(BUTCHER,user)
call SuicideUnitB(HIGH_PLAGUER,user)
call SuicideUnitB(NECROMANCER,user)
call SuicideUnitB(HERO,user)
endloop
endfunction