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

Selling item prob

Status
Not open for further replies.
Level 16
Joined
Jul 31, 2012
Messages
2,217
there is a shop that has shop sharing ability and shop purshace item ability
when the unit sells an item
the trigger :
  • Go to secretshop
    • Events
      • Unit - A unit Sells an item (from shop)
    • Conditions
      • (Item-type of (Sold Item)) Equal to Go to the Secret Shop
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Distance between (Position of (Selling unit)) and (Position of Secret Shop 0025 <gen>)) Less than (Distance between (Position of (Selling unit)) and (Position of Secret Shop 0038 <gen>))
        • Then - Actions
          • Unit - Order (Selling unit) to Move To (Position of Secret Shop 0025 <gen>)
        • Else - Actions
          • Unit - Order (Selling unit) to Move To (Position of Secret Shop 0038 <gen>)
should detect it but no is their a problem or another way around?
 
Level 16
Joined
Jul 31, 2012
Messages
2,217
Moving unit instantly issues stop order, that might screw things up.

Use this instead
  • set unit = Secret Shop 0025 <gen>
  • Custom script : call SetUnitX(GetSellingUnit(), GetUnitX(udg_unit))
  • Custom script : call SetUnitY(GetSellingUnit(), GetUnitY(udg_unit))

The problem is not here
I made a debug message at the begining of the trigger and there is no message
Even if i removed the conditions
 
Status
Not open for further replies.
Top