• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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:
Level 37
Joined
Mar 6, 2006
Messages
9,240
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.
 
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