• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Ancient-Like Building that Can Return Lumber

Status
Not open for further replies.
Level 2
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.
 
Level 3
Joined
Aug 17, 2007
Messages
51
Dont uprooted ancients and non-uprooted ancients have different unit files? if so just edit it there...

If not, you could use triggers... example

Unit uses - ability Uproot

Remove - Return lumber

Ect. Hope it works i have little to no clue without the editor infront of me.
 
Level 5
Joined
Jul 26, 2004
Messages
99
Even through the units are on different "unit files", some aspects and base abilities may carry over anyway (it's why a hero unit morphing to a non-hero unit remains a hero. Only some of the data is carried over).

And yes, Zodiac's suggestion should work. Adding Return Lumber when it roots will have a similar method.
 
Level 2
Joined
Jun 9, 2006
Messages
18
If you read my post, I already tried that. Sorry if it wasn't clear enough, but the uproot ability doesn't seem to trigger the any of the "Ability" events. =/

I'll try it again, but I tried making a trigger "unit begins casting ability" then "display "it worked" to owning player" and the text showed up when I used every other ability, but not uproot. I might have only done that for orders but I'm 99.9% positive I tried it with all of the ability based events. And yes, the uprooted form does count as a different unit when placing units, but it doesn't show up as a separate unit in triggers or object editor.

oh and rogues own locks and hunters
 
Last edited:
Status
Not open for further replies.
Top