• 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.

Detect if a units rally point is on a Unit?

Status
Not open for further replies.
Level 8
Joined
Jul 29, 2010
Messages
319
on my map peasants mine rocks, the rocks are just remodeled units, i'm trying to make it so that when a peasant finishes training and his rally point is on the rock, he auto attacks the rock, so far i've had 0 luck with this although from research i've found that a rally order is recognised as either "smart" or "setrally"

My progress so far, if you even call it progress.
  • Untitled Trigger 001
    • Events
      • Unit - A unit Is issued an order targeting a point
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Issued order) Equal to (Order(smart))
          • (Issued order) Equal to (Order(setrally))
    • Actions
      • Set Ordered_Unit = (Ordered unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Target unit of issued order)) Equal to Gold Ore
        • Then - Actions
          • Unit - Order Ordered_Unit to Attack (Target unit of issued order)
        • Else - Actions
 
Level 12
Joined
Nov 20, 2007
Messages
660
Do buildings get triggered by
if.gif
(Issued order) Equal to (Order(smart)) ?
If that so you simply have to save all buildings in an array along with the Target unit of issued order (for each one of them) and when a Peasant finishes training you order him to attack that unit.

Let me know if this is helpful.
 
Status
Not open for further replies.
Top