• 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 won't work?

Status
Not open for further replies.
Level 11
Joined
Jun 26, 2014
Messages
513
  • Test
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • (Issued order) Equal to (Order(stop))
      • (Owner of (Ordered unit)) Equal to Player 11 (Dark Green)
    • Actions
      • Wait 3.00 seconds
      • Unit - Kill (Ordered unit)
This trigger doesn't work. So its purpose is to kill units that have stoped moving.

In my TD map sometimes creeps stop moving so I came up with this but it doesnt work for some reason?
 
Level 6
Joined
May 20, 2014
Messages
228
In my tests, the trigger works only when the unit is explicitly ordered to stop (as in clicking the unit and pressing S or Stop button). An unit moving to a position and then stopping moving will basically do nothing since it isn't technically 'ordered' to stop.

If you're trying to add an anti-stuck, why not just make a stomp ability and order them to move to the next point?
 
Level 11
Joined
Jun 26, 2014
Messages
513
In my tests, the trigger works only when the unit is explicitly ordered to stop (as in clicking the unit and pressing S or Stop button). An unit moving to a position and then stopping moving will basically do nothing since it isn't technically 'ordered' to stop.

If you're trying to add an anti-stuck, why not just make a stomp ability and order them to move to the next point?

Yeh that was my plan B now i'll try it.

Edit: Okay turns out I don't know how to do it. Pls halp :(
 
Last edited:

sentrywiz

S

sentrywiz

Here is my solution (made in 2 minutes)

  • Create
    • Events
      • Some Event
    • Conditions
    • Actions
      • Set temploc = (Center of (Some Region))
      • For each (Integer A) from 1 to Max Number, do (Actions)
        • Loop - Actions
          • Unit - Create 1 Footman for Player 1 (Red) at temploc facing Default building facing degrees
          • Unit Group - Add (Last created unit) to tempgroup
      • Trigger - Turn on Move <gen>
      • Custom script: call RemoveLocation ( udg_temploc )
  • Move
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in tempgroup) Greater than 0
        • Then - Actions
          • Unit Group - Pick every unit in tempgroup and do (Actions)
            • Loop - Actions
              • Set temploc = (Center of (Some Region))
              • Unit - Order (Picked unit) to Move To temploc
              • Custom script: call RemoveLocation ( udg_temploc )
        • Else - Actions
          • Trigger - Turn off (This trigger)
OFC, there are too many ways to solve this.
This is just one that came to my mind atm.

Here is the test map if you get confused:
View attachment blaTD.w3x
 
Status
Not open for further replies.
Top