• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[Help!!!]Item Sold Out Remove

Status
Not open for further replies.
Level 3
Joined
Sep 14, 2008
Messages
26
How to remove item that sold at the unit?
How the neutral building remove item sold work?

Actually I want is after I buy this item from shop, the item will be remove from the vendor. Does anyone know how to do this?
 
To remove it from shop you'll have to add first through triggers, else won't work!
Example:
  • Add
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Neutral Building - Add "Your Item" to ("Your Shop") with 1 in stock and a max stock of 1
  • Buy
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to "Your Item"
    • Actions
      • Neutral Building - Remove "Your Item" from ("Your Shop")
 
Like for every player, there's each item in shop? In same slot of course. Nah there's no way to do that, but you can do it other way:
  • Untitled Trigger 001
    • Events
    • Conditions
    • Actions
      • Set Point = (Center of (Playable map area)) //point of your shop
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Unit - Create 1 "Your Shop" for (Player((Integer A))) at Point facing Default building facing degrees
          • Neutral Building - Add "Your Item" to (Last created unit) with 1 in stock and a max stock of 1
          • Unit - Hide (Last created unit)
          • Custom script: if (GetLocalPlayer() == Player(bj_forLoopAIndex)) then
          • Unit - Unhide (Last created unit)
          • Custom script: endif
      • Custom script: call RemoveLocation(udg_Point)
Here you create a shop for every player, each player player sees only his shop, so it's the same result.
 
Status
Not open for further replies.
Back
Top