HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Make a building start a trigger?

07-24-2002, 03:53 PM#1
Guest
I want to make a button of a building start a trigger. I tried what's described in the faq: training a unit and remove it with a trigger, and let that same trigger do the things you want it to do, but that's not a very convenient solution, since A. a "training" bar is displayed for a short time and B. it can't be used when training "real" units at the same time.
The Sell Unit system is instant, but it displays the amount in stock in the lower right corner and sometimes the trigger can't be activated because the button is "out of stock". (How can the stock amount and regernate time be modified?)

The last thing I tried was activating the trigger with the START training unit event, so that it will be activated instantly whenever the unit begins training, and then immediately cancel training the unit, so that the player will have no idea it was actually a unit being trained to activate the trigger. But the problem with this is: I don't know how to cancel training units in a trigger!

So: How can i make a button of a building start a trigger instantly?
07-24-2002, 04:13 PM#2
Myran
In the unit editor, select Standard Units->Items->[Any Item]
Gold and Lumber cost should be 0,
Stock Maximum 1,
Stock Start Delay and Stock Replenish Interval 0.
Then just make a building that can buy that item.

Then a trigger with
Events: Unit - A unit owned by [Select a player] Acquires an item
Action: Item - Remove (Last created item)


Promblems with this:
Hero required
Annoying little number on the button
07-25-2002, 11:18 AM#3
Guest
So that's the way to modify the stock amount/delay.. well, I'll use your solution but with a unit instead of an item, that way I still have that stupid number, but it's better than any other option I tried.