- Joined
- Jun 9, 2006
- Messages
- 18
I'm trying to make a building based off of a Night Elven Ancient (not classified as "Ancient" though) with an ability based off of uproot that workers can return lumber to. The problem is that I don't want it to have the Return Lumber ability when it's uprooted but get it back when it roots again.
I thought it'd be easy at first, but it's starting to piss me off. I tried a generic "unit uses ability" event, but turns out that doesn't trigger when a unit uses uproot. Then I tried a periodic event that checks whether the unit is classified as a structure, and when that didn't work, whether the unit was able to attack melee units.
I got it to work with "unit is ordered to unroot" "replace unit with (unit without return lumber)" (removing return lumber ability doesn't work with triggers, though adding it does), but then the problem was replacing the unit with a unit with the return lumber ability when it rooted again. When you use the Root ability you select a spot to root down, so if I added the Return Lumber ability when ordered to root the player could cancel the order or order it to do something else and be able to return lumber to it.
Anyone know a way I could do this? Probably really easy and I'm just being retarded, so thought I'd ask.
I thought it'd be easy at first, but it's starting to piss me off. I tried a generic "unit uses ability" event, but turns out that doesn't trigger when a unit uses uproot. Then I tried a periodic event that checks whether the unit is classified as a structure, and when that didn't work, whether the unit was able to attack melee units.
I got it to work with "unit is ordered to unroot" "replace unit with (unit without return lumber)" (removing return lumber ability doesn't work with triggers, though adding it does), but then the problem was replacing the unit with a unit with the return lumber ability when it rooted again. When you use the Root ability you select a spot to root down, so if I added the Return Lumber ability when ordered to root the player could cancel the order or order it to do something else and be able to return lumber to it.
Anyone know a way I could do this? Probably really easy and I'm just being retarded, so thought I'd ask.