• 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.

Abilities targeting destructables

Status
Not open for further replies.
Hello everyone!

I am trying to make a custom resource system but have run into a snag.
My idea was to use a harvest ability which targets the resource, and when used triggers a timer which will cause it to keep harvesting (until otherwise ordered).

The problem is that very few abilities accept destructables as targets. Some of the few i know of are "Eat Tree", "War Club" and "Sentinel", all of which have very specific behaviors.

"Eat Tree" will pause the caster until the destructable is dead. This is ofcourse very unhandy since it will have to kill the tree/resource everytime the unit chops at it.

"War club" uses a similar mechanic.

"Sentinel" can only be cast once at each destructable. The effect is not removed until the tree dies. Using this would essentially mean i'd have to replace each destructable everytime i use this ability on them, if i want to target them any more, and this is very problematic for a number of reasons (not mentioning if you have saved the destructable in a variable someshere - this would break all references to it).

What will i have to do to get a simple dummy ability which can target destructables?


EDIT: What i mean is, abilities which can target destructables which are unselectable. Most abilities can target selectable destructables, i think.
 
Last edited:
You could try using the Sentinel ability, but when a unit starts the effect of an ability, order it to cast hidden ability based on Channel. The effect of sentinel would not take place I guess. Make the ability have long follow through time and be instant type.

That is actually a great idea!! I will try it and see if it works. As of now, i have made the destructables selectable, and it works, but it would be neat to have them be like the normal resources of wc3.

Another question though, i noticed that a unit cannot be ordered to cast an ability on an object who is not visible to its owner.. although the "smart" order can. I am trying to override the units "smart" ability (right click) with the harvest order whenever it targets a resource, but when the resource/destructable is under the fog of war, the order does not execute. Is there any way to solve this? I don't want my unit to start attacking the gold mine!!
 
Status
Not open for further replies.
Top