• 🏆 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!

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
 
Level 16
Joined
Jul 31, 2012
Messages
2,217
The trigger doesn't fire when i take out conditions
The thing is [before] the shop had select unit ability not the shop sharing ability
Abd before, it fired perfectly
The shop sharing ability is required due to make the shop not sell items for enemy players
 
Status
Not open for further replies.
Top