HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Make unit ability start a trigger?

07-18-2002, 10:45 AM#1
Guest
So in the FAQ I saw how to let a building activate a trigger, simply by training a custom unit. But how can I make a unit start a trigger with a train/ability/order button?
For example, if I want a unit to have the ability to call another unit, how can I accomplish that?
07-19-2002, 09:07 PM#2
Guest
Please, can anyone solve this? I know I'm not the only one around here that wishes to make an ability button of a unit activate a trigger.... so help us!! :) or is this impossible?
07-21-2002, 07:49 PM#3
OrcishSpacesuit
Don't have Warcraft with me, as I am on vacation and just checking in. There are many ways to do this, but the best I found is to use the method used for buildings, but edit unitmetadata.slk (I think) so that units can SELL units (train may work, but is not instantaneous), and keep this edited version in Warcraft III\Units\. To edit it, go to the last columns I believe. Or you can just get one of the 20 Enhanced World Editors floating around and hope it does the trick. Note that you do NOT have to include the edited file with your map.

For those who don't know the building method, you use events to A: determine when a unit is trained/sold/whatever or B: a unit enters a region (right after being sold/.../...).
07-21-2002, 09:35 PM#4
Guest
i think the advanced editor allows you to make units that can create other units...the one Cookie made...
07-22-2002, 09:54 AM#5
Guest
Every order that you give to a unit can activate a trigger if you want it to. You just need to know what the "order name" is. For example, on Death Sheep, for unit movement, you are actually giving another unit off screen and order to hold and stop, then the actions move the unit that you're looking at.

Event:
Unit is given an order without a target

Condtion
Order is equal to stop

Event
Create unit for Player.....

Spells that simple activate such as Roar or Skeletons would be an order without a target, something like Blizzard is order with a point, Slow would be Order with a target etc.

You can find out what the order name is by using Display text (string((issued order))), which uses Convert order to string.
07-22-2002, 10:33 AM#6
Guest
For the people wondering what I'm trying to make, I made this unit, the Golem tamer, followed by a golem all the time that fights for the tamer. However, when in battle it goes it's own way, and I want the tamer to have the ability "Call back golem" that should order the golem to go to the tamer, ignoring enemy fire. The ability should have the icon of the item "Alleria's flute of accuracy" or something else suitable.

Thanx for the suggestions, the sell unit trick after works pretty well, I set "isbldg" to "1" for my unit, and now it can sell units :). The only problem is that there's an 'amount' number in the lower right corner of the icon of the unit that is sold. And when used 3 times, it has to regenerate. Training is no option, since the unit has an enormous rally point flag on his head :). Can't those amount and regenerate settings be modified for sold units?

And as for the ability order trigger, can't the icon and the tooltip of the ability be customized (without editing any data files that come with the game so that it won't work on other systems)?