Movement Trigger Problem

Dalemil

New Member
Reaction score
2
When the units spawn they don't go the way I want them to. I'm having trouble figuring out why. There's a picture below that helps explain what I want.

messy.png


Here are the triggers:

Trigger:
  • RegionArrays
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- Top --------
      • Set Top_RegionArray[0] = Top <gen>
      • Set Top_RegionArray[1] = Left1 <gen>
      • Set Top_RegionArray[2] = Left2 <gen>
      • Set Top_RegionArray[3] = Left3 <gen>
      • Set Top_RegionArray[4] = Left4 <gen>
      • Set Top_RegionArray[5] = Bottom <gen>
      • -------- Top_1 --------
      • Set Top_RegionArray_1[0] = Top1 <gen>
      • Set Top_RegionArray_1[1] = Right1 <gen>
      • Set Top_RegionArray_1[2] = Right2 <gen>
      • Set Top_RegionArray_1[3] = Right3 <gen>
      • Set Top_RegionArray_1[4] = Right4 <gen>
      • Set Top_RegionArray_1[5] = Bottom1 <gen>
      • -------- Bottom --------
      • Set Bottom_RegionArray[0] = Bottom <gen>
      • Set Bottom_RegionArray[1] = Right4 <gen>
      • Set Bottom_RegionArray[2] = Right3 <gen>
      • Set Bottom_RegionArray[3] = Right2 <gen>
      • Set Bottom_RegionArray[4] = Right1 <gen>
      • Set Bottom_RegionArray[5] = Top1 <gen>
      • -------- Bottom_1 --------
      • Set Bottom_RegionArray_1[0] = Bottom1 <gen>
      • Set Bottom_RegionArray_1[1] = Left4 <gen>
      • Set Bottom_RegionArray_1[2] = Left3 <gen>
      • Set Bottom_RegionArray_1[3] = Left2 <gen>
      • Set Bottom_RegionArray_1[4] = Left1 <gen>
      • Set Bottom_RegionArray_1[5] = Top <gen>


Trigger:
  • SpawnAll
    • Events
      • Time - Every 15.00 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
        • Then - Actions
          • Unit - Create 3 Footman for Player 1 (Red) at (Center of Top <gen>) facing Default building facing degrees
        • Else - Actions
          • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
        • Then - Actions
          • Unit - Create 3 Footman for Player 1 (Red) at (Center of Top1 <gen>) facing Default building facing degrees
        • Else - Actions
          • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
        • Then - Actions
          • Unit - Create 3 Footman for Player 1 (Red) at (Center of Bottom1 <gen>) facing Default building facing degrees
        • Else - Actions
          • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
        • Then - Actions
          • Unit - Create 3 Footman for Player 1 (Red) at (Center of Bottom <gen>) facing Default building facing degrees
        • Else - Actions
          • Do nothing


Trigger:
  • TopS
    • Events
      • Unit - A unit enters Top <gen>
      • Unit - A unit enters Left1 <gen>
      • Unit - A unit enters Left2 <gen>
      • Unit - A unit enters Left3 <gen>
      • Unit - A unit enters Left4 <gen>
    • Conditions
    • Actions
      • Unit - Set the custom value of (Triggering unit) to ((Custom value of (Triggering unit)) + 1)
      • Set Temp_Point = (Center of Top_RegionArray[(Custom value of (Triggering unit))])
      • Unit - Order (Triggering unit) to Attack-Move To Temp_Point
      • Custom script: call RemoveLocation( udg_Temp_Point )


Trigger:
  • Top1S
    • Events
      • Unit - A unit enters Top1 <gen>
      • Unit - A unit enters Right1 <gen>
      • Unit - A unit enters Right2 <gen>
      • Unit - A unit enters Right3 <gen>
      • Unit - A unit enters Right4 <gen>
    • Conditions
    • Actions
      • Unit - Set the custom value of (Triggering unit) to ((Custom value of (Triggering unit)) + 1)
      • Set Temp_Point = (Center of Top_RegionArray_1[(Custom value of (Triggering unit))])
      • Unit - Order (Triggering unit) to Attack-Move To Temp_Point
      • Custom script: call RemoveLocation( udg_Temp_Point )


Trigger:
  • BottomS
    • Events
      • Unit - A unit enters Bottom <gen>
      • Unit - A unit enters Left4 <gen>
      • Unit - A unit enters Left3 <gen>
      • Unit - A unit enters Left2 <gen>
      • Unit - A unit enters Left1 <gen>
    • Conditions
    • Actions
      • Unit - Set the custom value of (Triggering unit) to ((Custom value of (Triggering unit)) + 1)
      • Set Temp_Point = (Center of Bottom_RegionArray[(Custom value of (Triggering unit))])
      • Unit - Order (Triggering unit) to Attack-Move To Temp_Point
      • Custom script: call RemoveLocation( udg_Temp_Point )

Trigger:
  • Bottom1S
    • Events
      • Unit - A unit enters Bottom1 <gen>
      • Unit - A unit enters Right4 <gen>
      • Unit - A unit enters Right3 <gen>
      • Unit - A unit enters Right2 <gen>
      • Unit - A unit enters Right1 <gen>
    • Conditions
    • Actions
      • Unit - Set the custom value of (Triggering unit) to ((Custom value of (Triggering unit)) + 1)
      • Set Temp_Point = (Center of Bottom_RegionArray_1[(Custom value of (Triggering unit))])
      • Unit - Order (Triggering unit) to Attack-Move To Temp_Point
      • Custom script: call RemoveLocation( udg_Temp_Point )
 

Finestdeath

New Member
Reaction score
10
For your SpawnAll trigger, why use If/Then/Else when you have no If and Else? For your other triggers (not including the first one), I think you should use If/Then/Else, and why the custom value?
 
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