HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Buying items

11-08-2003, 08:39 PM#1
Eriond
How do I cause a trigger to fire whenever a unit buys an item?
11-08-2003, 08:45 PM#2
Axiverse
there are events - unit - specific unit event and unit - player conrtolled event that triggers when unit aquires an item or unit sells an item and much more
11-08-2003, 08:52 PM#3
Eriond
I know that, but I want to make it so when the unit buys the item, not when he picks it up (A.K.A. Aquiring, because that applies to any method of aquiring)
11-08-2003, 09:20 PM#4
AllPainful
The event your looking for is a UNIT action...
Code:
Item Purchase
    Events
        Unit - BlahBlah 0000 <gen> Sells an item
    Conditions
        (Item-type of (Sold Item)) Equal to ItemBlah
    Actions
        Blah Blah Blah
The above is a "Unit - Specific unit" event...

The below is a "Unit - Generic unit" event...

Code:
Item Purchase
    Events
        Unit - A unit Sells an item
    Conditions
        (Item-type of (Sold Item)) Equal to ItemBlah
    Actions
        Blah Blah Blah
You can even do a codition "(Owner of (Buying unit)) Equal to Player 1 (Red)" which would make the trigger only fire if player 1 was doing the buying..
11-08-2003, 09:30 PM#5
Eriond
Right.... Now I see it... when it said: Unit Sells an Item I thought it meant when you sell it for gold, not when the shop sells it to another unit... thanks, you've really helped me.
11-08-2003, 09:37 PM#6
AllPainful
Glad to be of assistance.. And I can definatly see how it could be mistaken for units selling items for gold...

As a matter of fact, you sparked my interest...

I KNOW the trigger fires when someone buys and item... but would it also fire is someone sold an item for gold? Hmmm.... I wonder...