HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Item stock to shop

06-03-2008, 08:02 PM#1
abriko
Hi :)

I add different types of items to shops when the player complete the different quests, but the shop are empty at the beginning. The problem is that the item disappear after the first purchase. It tried many paramater for the trigger Add item type with stock but it is always the same problem.
So i tried to create a small trigger with event "a item is sold" and action "add item type to selling shop" but sometimes the item disappears anyway.

Is there an easy way to fix that ? Am i blind () or is it a known problem ?
06-03-2008, 08:12 PM#2
Rising_Dusk
If you add an item to a unit's stock, it will stay there until it is removed from stock via trigger. Ensure that you don't have any triggers that might be conflicting on the item-purchasing event.
06-03-2008, 08:14 PM#3
abriko
hum no, i think that i don't have any triggers in conflict, but i'll try on a empty map.
06-03-2008, 08:15 PM#4
rulerofiron99
It's most probably because you based the shop on Marketplace. Base it on Goblin Merchant instead.
06-03-2008, 08:39 PM#5
abriko
What is the difference ? A shop is not a building with abilities ?
I just tried on a new and empty map. The Market has the same problem, the item disappear. The trigger "add item type to shop" doesn't work on goblin merchant.
Attached Files
File type: w3xTeshop.w3x (16.4 KB)
06-03-2008, 09:32 PM#6
Captain Griffen
Try adding it initially by triggers.
06-03-2008, 09:39 PM#7
abriko
With "map initialization" ? I tried already ^^
I tried to add items in object editor, removing it then adding it. It doesn't work ( both the removing and the adding )
06-04-2008, 06:25 AM#8
311
Quote:
Originally Posted by abriko
With "map initialization" ? I tried already ^^
I tried to add items in object editor, removing it then adding it. It doesn't work ( both the removing and the adding )

I think you need the ability "sell item" on the building, the building goblin merchant dont have it, but the marketplace does. So try adding that maybe or check some of the fields like the items made field, I'm not sure
06-04-2008, 07:45 AM#9
abriko
Test the small map i created. I placed the original Market and original Goblin Marchant, so they both have what they need to sell items.

What is the difference between the 2 buildlings ?

The only difference is the Sell unit and items abilities on Market. It is important if i want to add items or units because the triggers doesn't work on Goblin Merchant because of that. If you add Sell unit and items abilities, you'll tranform Merchant in Market. That's simple.

My problem is that item disappear if the first purchase, event if there is 10 items of the same type in stock.
Try the tiny map, you'll understand.
06-04-2008, 01:08 PM#10
rulerofiron99
I have made a great success.

Trigger:
Reshop
Collapse Events
Unit - A unit Sells an item (from shop)
Conditions
Collapse Actions
Neutral Building - Add (Item-type of (Sold Item)) to Marketplace 0000 <gen> with 1 in stock and a max stock of 1

If that might be what you're looking for. The items now stay in the marketplace.
06-04-2008, 01:44 PM#11
abriko
Thanks but that is exactly what i did in my map. ^^
I also converted it in jass for the multi-instance. My original problem is that sometimes, the item disappears anyway :/
06-04-2008, 03:43 PM#12
rulerofiron99
Interesting.
06-04-2008, 03:46 PM#13
abriko
.... war3 bug or shops are not destinated to do that ?
06-04-2008, 04:33 PM#14
rulerofiron99
Blizzard bug.

The item dissappearing: is it always the same item or does it randomise?
06-04-2008, 05:12 PM#15
abriko
I think it is always the item at position 0.0. After the 7 small quests, the shop contains 7 items. Near the end of the game, the shop contains 2 or 3...