| 10-04-2009, 11:26 AM | #1 |
Hi, i have a question. I just cant solve this by my self :( I have a bundle of items that you can buy from shops. But there is one problem, i want that you must be a specific class to buy/pick up the item. Ex, you need to be a paladin to pick up a hammer. So, if there is a hammer on the ground. You cant pick it up with ex Pit lord. Well, we can say like this too. I want that you need to be a specific class to buy a specific item (You cant buy it). and you cant pick up a item if it not is for your class. Like,if you buy a hammer the hammer is removed from your inventory and you gets all of your gold back. But when the Hammer is on the ground, you cant pick it up. Im using this right now: But the problem here is that even when you pick the item up. The item is removed and you get gold. Just want that you cant pick it up and this trigger only works when you buy an item ;) Hope i posted right |
| 10-04-2009, 06:53 PM | #2 |
IIRC, "a unit sells an item" registers before acquires an item, so you can detect it from there. If not, you can use a combination of checking the unit under "buying unit" or "selling unit", see if it's null, and then react accordingly (eg. if selling unit == SHOP, then remove + give gold, otherwise, drop it on the ground). |
