HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Player stocked shops?

07-25-2006, 02:44 PM#1
AtOmIc_PeAnUt
Hi all, I have a question about how I would go about creating a shop which is stocked by the player, by which I mean an initially empty shop, where the player can somehow put items into it (like pawning but without getting any money for it) and then the item will be displayed for other players to come and buy. I have no idea where to start with this, so any help would be great thnx
07-25-2006, 02:51 PM#2
Fallenzeca
I think this should work.
trigger:
Trigger:
help
Collapse Events
Unit - A unit Pawns an item (to shop)
Conditions
Collapse Actions
Set item = (Sold Item)
Neutral Building - Add ItemBeingPawned to Shop with 0 in stock and a max stock of 1

btw you have to make a custom shop in the object editor and remove all items being sold ofc.
07-25-2006, 02:55 PM#3
The)TideHunter(
Something like:
Trigger:
Add
Collapse Events
Unit - A unit Pawns an item (to shop)
Conditions
Collapse Actions
Neutral Building - Add (Item-type of (Sold Item)) to (Buying unit) with 1 in stock and a max stock of 10

But you could change the event and actions in any way, instead of Pawning the item, it might be targeted through an ability.
07-25-2006, 03:17 PM#4
AtOmIc_PeAnUt
Ok, thnx, and how would I make it so the "select hero" ability would only select allies of the shop's owner?
07-25-2006, 03:29 PM#5
The)TideHunter(
Base the shop from the Arcane vault (human) or any of the other, that only allows allies to use it.
07-25-2006, 06:23 PM#6
Linera
This sounds like a good idea. do you mind if I make something with it?
08-01-2006, 12:44 PM#7
AtOmIc_PeAnUt
OK, so how would I stop the player getting any money for putting something into his shop, and also would there be any way of allowing the player to set the prices?
08-01-2006, 01:43 PM#8
Wyvernoid
Quote:
Originally Posted by The)TideHunter(
Base the shop from the Arcane vault (human) or any of the other, that only allows allies to use it.
The real difference is that racial shops use "Items MADE" while neutral ones use "Items SOLD". Corresponding to shops using these two different attributes, they will have to have different abilities.

Quote:
OK, so how would I stop the player getting any money for putting something into his shop, and also would there be any way of allowing the player to set the prices?
For not refunding money, in you Terrain Editor, click "Advanced -> Gameplay Constants", and find something about "Pawn Item Rate", and set it to 0.00.
For allowing the player to set prices, I think it's impossible to do in UI, but you could use some triggers: one is the event "Player - Chat Message" (to set price) another is a combination of the event "A Unit Buys An Item" and action "Player - Add Property"(when buying, to substract buyer's gold).

Hope this helps ;-)
08-03-2006, 01:20 PM#9
AtOmIc_PeAnUt
OK, thnx again every1, would there be a way of removing the item from the shop completely once it becomes out of stock, instead of just waiting for it to restock? That way the player would have to restock manually.
08-03-2006, 01:48 PM#10
Wyvernoid
Trigger:
Collapse Event
Unit - A unit Acquires an item
Condition
Collapse Action
Neutral Building - Remove (Item-type of (Item Being Manipulated)) from All Marketplaces
Well a disadvantage is that, once an item is out of stock in one market, all other markets will lose this item.
So my opinion is that, make a shop for each item-class, and instead of using the "... from All Marketplaces" above, use "... from {The Certain Shop}", and multiple "if-then-else"s checking item-class.
08-03-2006, 02:10 PM#11
AtOmIc_PeAnUt
Ahhh yes, thnx. Actually there is a seperate trigger to remove it just from one marketplace :D But there is only one shop in my map anyway so it doesn't really matter :P

PS: Thnx for all Ur help Wyvernoid (+Rep) :D