Unit Spawn Porblem

dondonda

New Member
Reaction score
3
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
      • Custom script: call RemoveLocation(udg_UndeadAttackArea)
      • Custom script: call RemoveLocation(udg_UndeadSpawn)
      • Custom script: call DestroyGroup(udg_AllUndead)

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)
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
Where are the 3 regions? Maybe upload your map?

Edit: Where is Evil enter? Shouldn't it be something like Set EvilEnter = EvilEnter <gen> and not Set EvilEnter = EvilEnter ?

Try changing entering unit to triggering unit.
 

dondonda

New Member
Reaction score
3
Nevermind i fixed it ... i was setting a variable to a variable... lol i can be so dumb sometimes
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
Guessed as much, cause I didn't see the <gen> over there. ;)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top