| 09-05-2002, 08:01 AM | #1 |
I haven't been able to find a event that will trigger when you buy something from a store. In wrapping up my map, I decided to add one more feature. The shop would allow you to buy an item from it, however, after you buy the item, the shop would be replaced by an empty shop to basically, keep you to a one item limit. I've thought about using the obtains an item, but it would be a pain to have to check for all the items that can be bought. Then I thought about obtain item within region, which would work, except if they obtain something that maybe a teammate dropped, it would trigger the remove shop trigger, which also keeps me from making the region to big. Any help would be appreciated. TIA. |
| 09-05-2002, 08:25 AM | #2 |
Guest | what if you set the items respawn time to 9999999 (a lot of hours) ? also you can use the unit aquires an item feature |
| 09-05-2002, 08:05 PM | #3 |
Guest | In case you're talking about units too, buying a unit counts as a finishes training a unit event.. Also, if a unit buys an item, this event can be used: Unit - (store) is issued an order with no target. Now, when buying a unit, you can specify the unit type at the 'order comparison' condition. However, you can't specify items, I think blizzard just forgot to make that.. If the store just contains one item, you don't need any condition at all since the order will always be that only avaiable item. There are various ways to test the 'buy' event like these.. just keep trying :) Hope this helps a little. |
| 09-05-2002, 08:17 PM | #4 |
Guest | You could use Unit is issued an order with No Target for the Merchant. That will activate when ever an item is bought from the merchant, and fortunatly will not trigger the event if the player doesn't have enough money or if the item is out of stock. |
| 09-06-2002, 01:08 AM | #5 |
ok, some things for me to try. And just in case you're wondering, the store is designed so you can only buy ONE item, period, not one of each item. Basically, you buy an item and then the store is transported somewhere else. DrunkOM, I'm not sure what you mean. Do you mean? event: unit is given action with no target *or however its put* Either way, I'll mess around with the ideas given to me. Thanks. |
| 09-06-2002, 03:53 AM | #6 |
Guest | Event: Unit - [Goblin Merchant] is issued an order with no target Actions: Remove (Ordered Unit) from game. Create 1 [Empty Merchant] for [player] at (location of (ordered unit) facing default building location. That's basically what you need to do. |
| 09-06-2002, 01:21 PM | #7 | |
Guest | Quote:
Yup, thats what's about i suggested too. |
| 09-06-2002, 04:59 PM | #8 |
Guest | I know, but he seemed to be a bit confused. |
| 09-06-2002, 05:36 PM | #9 |
I dunno, but he might run into trouble there, removing the ordered unit before creating the other unit...Or are those kinds of things kept in memory until the function is done running? |
| 09-06-2002, 06:50 PM | #10 |
Guest | They're kept around until the "trigger thread" is complete. |
| 09-06-2002, 07:37 PM | #11 |
Oh, okay, never mind what I was saying then |
