• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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