Remove item from shop

Somebody666

New Member
Reaction score
0
Hi I have one problem. :) I wanna do simple trigger which remove item when i buy it from shop. How I can do this please? I'm new in W3 editor. :) Thanks for help

PS: Sorry for my english. %)
 

meOme

New Member
Reaction score
31
You can remove items from a shop with the trigger action "neutral building - remove item type (from marketplace)".
But this only works on items that have been added to the shop with "neutral building - add item type (to marketplace)".

So what you do is:
1) In the Object Editor, remove all sold items from the shop. (Or use Marketplace as the base for your shop, it is already perfect for this)
2) Then at the beginning of the game, add the items you want the shop to have with "neutral building - add item type (to marketplace)".
3) And for buying an item, you use:
Trigger:
  • Item
    • Events
      • Unit - A unit Erwirbt einen Gegenstand
    • Conditions
    • Actions
      • Neutral Building - Remove (Item-type of (Item being manipulated)) from (Selling unit)
 

Somebody666

New Member
Reaction score
0
You can remove items from a shop with the trigger action "neutral building - remove item type (from marketplace)".
But this only works on items that have been added to the shop with "neutral building - add item type (to marketplace)".

So what you do is:
1) In the Object Editor, remove all sold items from the shop. (Or use Marketplace as the base for your shop, it is already perfect for this)
2) Then at the beginning of the game, add the items you want the shop to have with "neutral building - add item type (to marketplace)".
3) And for buying an item, you use:
Trigger:
  • Item
    • Events
      • Unit - A unit Erwirbt einen Gegenstand
    • Conditions
    • Actions
      • Neutral Building - Remove (Item-type of (Item being manipulated)) from (Selling unit)

Thank you. That works, but I have tiny problem. I add to neutral building some item with 6 stocks, but when I buy it all 6 stocks will vanish from shop. How can I fix that?
 

Mahrloc

New Member
Reaction score
5
Set a condition to that function:
Trigger:
  • Item
    • Events
      • Unit - A unit Erwirbt einen Gegenstand
    • Conditions
      • (Item being manipulated) unequal to (Your item)
    • Actions
      • Neutral Building - Remove (Item-type of (Item being manipulated)) from (Selling unit)
 

Somebody666

New Member
Reaction score
0
Set a condition to that function:
Trigger:
  • Item
    • Events
      • Unit - A unit Erwirbt einen Gegenstand
    • Conditions
      • (Item being manipulated) unequal to (Your item)
    • Actions
      • Neutral Building - Remove (Item-type of (Item being manipulated)) from (Selling unit)

I do it. =/
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top