• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Some help with my moving units triggers...

Status
Not open for further replies.
Level 1
Joined
Apr 3, 2007
Messages
3
I'm working on a TD where there are 8 people in a circle and the units that spawn are supposed to go to their point from the spawn point then all the way around the circle through the other peoples towers then back to him and then to the center. I thought this code would work but it's not :/ can someone help me?

  • TL continue moving
    • Events
      • Unit - A unit enters TLGoTo <gen>
    • Conditions
      • (Owner of (Entering unit)) Equal to Player 12 (Brown)
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Custom value of (Entering unit)) Equal to 8
        • Then - Actions
          • Set loc = Score <gen>
          • Unit - Order (Entering unit) to Move To (Center of loc)
          • Custom script: call RemoveRect( udg_loc)
        • Else - Actions
          • Unit - Set the custom value of (Entering unit) to ((Custom value of (Entering unit)) + 1)
          • Set loc = TRGoTo <gen>
          • Unit - Order (Entering unit) to Move To (Center of loc)
          • Custom script: call RemoveRect( udg_loc)
 
Level 1
Joined
Apr 3, 2007
Messages
3
I tried all that, still no dice.

You meant to get rid of the unit being owned by brown when you said w/o conditions right?

Edit: I disabled that trigger and just used the spawn trigger that is supposed to move the units to that area and they just went to a point in the middle again...

Let me put up those triggers...

#1
  • Next Level Timer
    • Events
      • Time - Timer expires
    • Conditions
    • Actions
      • Countdown Timer - Destroy (Last created timer window)
      • Unit - Create Levels_Unit_Count[Levels_Current] Levels_Units[Levels_Current] for Player 12 (Brown) at (Center of BLSpawn <gen>) facing Default building facing (270.0) degrees
      • Unit - Create Levels_Unit_Count[Levels_Current] Levels_Units[Levels_Current] for Player 12 (Brown) at (Center of BMSpawn <gen>) facing Default building facing (270.0) degrees
      • Unit - Create Levels_Unit_Count[Levels_Current] Levels_Units[Levels_Current] for Player 12 (Brown) at (Center of BRSpawn <gen>) facing Default building facing (270.0) degrees
      • Unit - Create Levels_Unit_Count[Levels_Current] Levels_Units[Levels_Current] for Player 12 (Brown) at (Center of MLSpawn <gen>) facing Default building facing (270.0) degrees
      • Unit - Create Levels_Unit_Count[Levels_Current] Levels_Units[Levels_Current] for Player 12 (Brown) at (Center of MRSpawn <gen>) facing Default building facing (270.0) degrees
      • Unit - Create Levels_Unit_Count[Levels_Current] Levels_Units[Levels_Current] for Player 12 (Brown) at (Center of TLSpawn <gen>) facing Default building facing (270.0) degrees
      • Unit - Create Levels_Unit_Count[Levels_Current] Levels_Units[Levels_Current] for Player 12 (Brown) at (Center of TMSpawn <gen>) facing Default building facing (270.0) degrees
      • Unit - Create Levels_Unit_Count[Levels_Current] Levels_Units[Levels_Current] for Player 12 (Brown) at (Center of TRSpawn <gen>) facing Default building facing (270.0) degrees
      • Game - Display to (All players) the text: (Level + ((String(Levels_Current)) + has begun!))
#2
  • Top Left Spawn
    • Events
      • Unit - A unit enters TLSpawn <gen>
    • Conditions
      • (Owner of (Entering unit)) Equal to Player 12 (Brown)
    • Actions
      • Unit - Set the custom value of (Entering unit) to 0
      • Set loc = TLGoTo <gen>
      • Unit - Order (Entering unit) to Move To (Center of loc)
      • Custom script: call RemoveRect( udg_loc)
 
Level 2
Joined
Jun 10, 2007
Messages
19
It could be a problem with your custom values or your custom script. Is it just that they arent moving? Are they moving any?? And what is loc? This info would be helpful.
 
Level 1
Joined
Apr 3, 2007
Messages
3
loc is just a variable. I started making this map after reading Ralle's TD guide. It said making a variable then getting rid of it would stop leak. I also tried it without that and the same thing happened. They moved to a point a little north east of the middle.
 
Status
Not open for further replies.
Top