• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] GUI Send Trigger Help

Status
Not open for further replies.
Level 4
Joined
Aug 26, 2009
Messages
65
I want this trigger to only send idle units but have no idea what condition to do so with...... any advice
  • Events
    • Time - Every 1.00 seconds of game time
  • Conditions
  • Actions
    • Unit - Order (Random unit from (Units in (Playable map area) owned by Player 11 (Dark Green))) to Attack-Move To (Position of RedHero)
    • Unit - Order (Random unit from (Units in (Playable map area) owned by Player 11 (Dark Green))) to Attack-Move To (Position of BlueHero)
    • Unit - Order (Random unit from (Units in (Playable map area) owned by Player 11 (Dark Green))) to Attack-Move To (Position of TealHero)
    • Unit - Order (Random unit from (Units in (Playable map area) owned by Player 11 (Dark Green))) to Attack-Move To (Position of PurpleHero)
    • Unit - Order (Random unit from (Units in (Playable map area) owned by Player 11 (Dark Green))) to Attack-Move To (Position of BlueHero)
    • Unit - Order (Random unit from (Units in (Playable map area) owned by Player 11 (Dark Green))) to Attack-Move To (Position of YellowHero)
    • Unit - Order (Random unit from (Units in (Playable map area) owned by Player 11 (Dark Green))) to Attack-Move To (Position of OrangeHero)
    • Unit - Order (Random unit from (Units in (Playable map area) owned by Player 11 (Dark Green))) to Attack-Move To (Position of PinkHero)
    • Unit - Order (Random unit from (Units in (Playable map area) owned by Player 11 (Dark Green))) to Attack-Move To (Position of GreenHero)
    • Unit - Order (Random unit from (Units in (Playable map area) owned by Player 11 (Dark Green))) to Attack-Move To (Position of GreyHero)
    • Unit - Order (Random unit from (Units in (Playable map area) owned by Player 11 (Dark Green))) to Attack-Move To (Position of LbHero)
 
Level 7
Joined
Mar 8, 2009
Messages
360
put the ordered unit in a unit group and add ((Matching Unit) is not in unit group) to units in playable map area.

Something like this
  • Actions
    • Set tempUnit = (Random unit from (Units in (Playable map area) matching (((Matching unit) is in orderedGroup) Equal to False)))
    • Unit - Order tempUnit to Attack-Move To (Position of yourTarget)
    • Unit Group - Add tempUnit to orderedGroup
EDIT: I think you have to remove the unit from the group when they die to avoid lag.
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
You could try doing with IF-THEN-ELSE.

Unit Group is all units of type...in playable map area
IF current order of picked unit equal to <no order>
THEN move
ELSE

I am not sure how to check the current order of a unit that is not doing anything.

Make a trigger that creates a floating text over a unit that display its current order every one second. Then you will see the current order of an idle unit.
 
Status
Not open for further replies.
Top