HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Removing Items from a shop?

05-23-2006, 07:20 PM#1
Fulla
For an Aos map, Im trying to setup a research "Shop" For each team, to research upgrades for their teams units.

The idea is that a Player can buy a research upgrade.
So I made dummy items in a shop, that are meant to be replaced by the next level when bought.

The Shop abilities are:
Select Hero, Sell Items, Invulnerable, Sell units, Shop Purchase Item.

Here is the trigger.

Trigger:
Upgrade
Collapse Events
Unit - A unit Sells an item (from shop)
Collapse Conditions
(Item-type of (Sold Item)) Equal to Upgrade Melee Damage - Level1
Collapse Actions
Neutral Building - Remove Upgrade Melee Damage - Level1 from (Selling unit)
Neutral Building - Add Upgrade Melee Damage - Level2 to (Selling unit) with 1 in stock and a max stock of 1

It adds the next level dummy item fine, but it does NOT remove the just bought item??

Help please.
thx
Fulla
05-23-2006, 07:30 PM#2
Rising_Dusk
Actually, I was fiddling with this idea before.
The only way to remove the items in that way is to first add them in that way.

So try at map initialization adding the first level of the item dummies to whatever shop, then when you get the first level, removing the first level and adding the second, etc.

That should work.
If not... Well you could always destroy the shop and readd the proper items based on variables.
05-23-2006, 07:38 PM#3
Fulla
Ah thx, it works now :-)