• 🏆 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!

[Spell] Single-target spell that targets a tree/debris

Status
Not open for further replies.
I am not entirely sure, but there are a few target allowed in the object editor.

"Bridge, debris, decoration, terrain, tree, wall"

Pretty sure some combination of them should work.
I know, however, if I take a single-target unit spell and modify the targets allowed to tree and debris, it doesn't work (even though I can target the destructible, the "Unit starts the effect of an ability" event for that ability doesn't get triggered)
 

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,183
Uh-huh, interesting.

Can you try with the unit begin casting event and see if it triggers?
If it does there might be a workaround possible.

edit: actually I might know a way to make it work either way.

1. Detect when unit is issued to use your spell with Unit - A unit Is issued an order targeting an object

2. Spawn an invisible dummy unit on top of tree

3. Order unit to cast the spell on the dummy unit instead

4. Execute spell with the unit starts effect of ability

Which sounds nice when I abstract the idea, it is quite annoying in practice, so probably not worth it unless you REALLY want this spell.
 
Last edited:
there is this nightelf non hero skill placing an owl on a tree.
Ah yes, Sentinel?
It seems that the spell creates an owl that stays on the tree permanently until the tree dies, though, so you can't cast it more than once on a tree. And the owl's duration can't be changed.
 
I solved the problem I was having, it turns out the issue was caused by the way I set up the dummy unit. But thanks to this thread I now know a few quirks with tree-targeting spells. Such as single-targeted dispels when used on a normal tree will display a message "That tree is not occupied by an owl". The owl from Sentinel also gets dispelled by someone attacking the tree.
 
Status
Not open for further replies.
Top