I have created some unit spawns that are directed to a region, then when they enter the region they move to another region. The problem is when the units enter the first region, they just turn around and move back to where they spawned... I cant see the error maybe somebody can help!
Trigger:
- Undead Spawn
- Events
- Time - Elapsed game time is 180.00 seconds
- Conditions
- Actions
- Set UndeadAttackArea = (Center of Undead Attack Area <gen>)
- Set UndeadSpawn = (Center of Undead Spawn Area <gen>)
- Unit - Create 25 New Corpse for Player 12 (Brown) at UndeadSpawn facing Default building facing degrees
- Set AllUndead = (Units in Undead Spawn Area <gen>)
- Unit Group - Pick every unit in AllUndead and do (Actions)
- Loop - Actions
- Unit - Order (Picked unit) to Attack-Move To UndeadAttackArea
- Loop - Actions
- Custom script: call RemoveLocation(udg_UndeadAttackArea)
- Custom script: call RemoveLocation(udg_UndeadSpawn)
- Custom script: call DestroyGroup(udg_AllUndead)
- Events
Trigger:
- Undead Director
- Events
- Unit - A unit enters Undead Attack Area <gen>
- Conditions
- (Owner of (Entering unit)) Equal to Player 12 (Brown)
- Actions
- Set EvilEnter = EvilEnter
- Unit - Order (Entering unit) to Attack-Move To EvilEnter
- Custom script: call RemoveLocation(udg_EvilEnter)
- Events