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

[Spell] Ability to target tree, mine, structure?

Status
Not open for further replies.
Level 1
Joined
Sep 28, 2014
Messages
4
So I'm making a custom race based upon elementals and summoning, and I'm having some trouble here.

I need an ability that can target a tree, OR a mine/structure. I figured that I would probably have to use triggers to differentiate between gold mines and structures owned by the unit, but before I even get to that point I need an ability that can target trees properly AND the structures.

I tried using Channel but couldn't get it to properly target trees. I've seen a lot of people talk about using "Eat Tree" and "Sentinel" as base abilities, but I'm not sure if those will work. Can they be made to target things OTHER than trees?

For anyone wondering, the idea is the ability summons a Locusted Worker unit called an "Echo" which goes to the target and does an appropriate action. IE, if you send it to a tree it will harvest lumber Wisp-style for its duration. If you send it to a "planeshifted" gold mine, it will harvest gold Acolyte-style for its duration. If you send it to a friendly structure, it will repair that structure. I think I know how to get it to do that with triggers, but I need an ability that can actually TARGET all those things for the trigger to detect.
 
Last edited:
Level 14
Joined
Dec 12, 2009
Messages
1,027
So I'm making a custom race based upon elementals and summoning, and I'm having some trouble here.

I need an ability that can target a tree, OR a mine/structure. I figured that I would probably have to use triggers to differentiate between gold mines and structures owned by the unit, but before I even get to that point I need an ability that can target trees properly AND the structures.

I tried using Channel but couldn't get it to properly target trees. I've seen a lot of people talk about using "Eat Tree" and "Sentinel" as base abilities, but I'm not sure if those will work. Can they be made to target things OTHER than trees?

For anyone wondering, the idea is the ability summons a Locusted Worker unit called an "Echo" which goes to the target and does an appropriate action. IE, if you send it to a tree it will harvest lumber Wisp-style for its duration. If you send it to a "planeshifted" gold mine, it will harvest gold Acolyte-style for its duration. If you send it to a friendly structure, it will repair that structure. I think I know how to get it to do that with triggers, but I need an ability that can actually TARGET all those things for the trigger to detect.

You can edit the "Stats - Targets Allowed" of any ability that you want to use as a base (doesn't have to be the Eat Tree). For targeting the gold mine, allow the ability to target invulnerable. I doubt this would help you with the mining though.

However, the unit would need both the "Return lumber" ability that the Wisp has as well as the Acolyte's "Gather (Acolyte Gold)" ability to harvest resources in the same manner as each respective unit. Otherwise you'd just target a unit and do nothing (unless the harvesting is done only by triggers as an effect).

//\\oo//\\
 
Level 1
Joined
Sep 28, 2014
Messages
4
You can edit the "Stats - Targets Allowed" of any ability that you want to use as a base (doesn't have to be the Eat Tree). For targeting the gold mine, allow the ability to target invulnerable. I doubt this would help you with the mining though.

However, the unit would need both the "Return lumber" ability that the Wisp has as well as the Acolyte's "Gather (Acolyte Gold)" ability to harvest resources in the same manner as each respective unit. Otherwise you'd just target a unit and do nothing (unless the harvesting is done only by triggers as an effect).

//\\oo//\\

Except that the "Targets Allowed" thing doesn't actually work for trees. Checking it accordingly does NOT allow just any ability to target trees. I've tried, and I've seen numerous complaint threads about it. Doesn't seem to work that way, and that's the source of my problem.

I know the unit would need those abilities, and it would be ordered to use the correct one according to the target with triggers. That's not the problem, or the hard part.
 
Level 14
Joined
Dec 12, 2009
Messages
1,027
Except that the "Targets Allowed" thing doesn't actually work for trees. Checking it accordingly does NOT allow just any ability to target trees. I've tried, and I've seen numerous complaint threads about it. Doesn't seem to work that way, and that's the source of my problem.

I know the unit would need those abilities, and it would be ordered to use the correct one according to the target with triggers. That's not the problem, or the hard part.

I mistook attacking-target with spell target. Check the attached map to see if the ability is doing what you want (the modified sentinel ability with very long cast time and slow missile speed as well as very small cast range to prevent a kind-of bug where trees cannot be reselected in the future).

//\\oo//\\
 

Attachments

  • SelectAbility.w3x
    22.5 KB · Views: 71
Level 1
Joined
Sep 28, 2014
Messages
4
I mistook attacking-target with spell target. Check the attached map to see if the ability is doing what you want (the modified sentinel ability with very long cast time and slow missile speed as well as very small cast range to prevent a kind-of bug where trees cannot be reselected in the future).

//\\oo//\\

YES! THANK YOU! This is almost exactly what I needed. Course, casting it freezes the unit but that's fine cause I'm guessing I can catch the cast and cancel it after I use the target for the triggers I need (that is the way catch-cancelling works, right?).

It lets you target enemy buildings, too, but I'm guessing adding "friendly" to the allowed targets would interfere with trees and gold mines, so I'll just differentiate that by triggers.

EDIT: Errrr... how do you cancel abilities through triggers? Can you? I thought so but I can't seem to find the function... do you just use the "Unit - Replace" one?
EDIT2: I think I got it, I just have to order the unit to Stop :p
 
Last edited:
Level 14
Joined
Dec 12, 2009
Messages
1,027
YES! THANK YOU! This is almost exactly what I needed. Course, casting it freezes the unit but that's fine cause I'm guessing I can catch the cast and cancel it after I use the target for the triggers I need (that is the way catch-cancelling works, right?).

It lets you target enemy buildings, too, but I'm guessing adding "friendly" to the allowed targets would interfere with trees and gold mines, so I'll just differentiate that by triggers.

EDIT: Errrr... how do you cancel abilities through triggers? Can you? I thought so but I can't seem to find the function... do you just use the "Unit - Replace" one?
EDIT2: I think I got it, I just have to order the unit to Stop :p

Stopping it should be sufficient, but check with the guys in the trigger forum to be sure.

//\\^^//\\
 
Level 1
Joined
Sep 28, 2014
Messages
4
Stopping it should be sufficient, but check with the guys in the trigger forum to be sure.

//\\^^//\\

I've already done some testing and it does seem to work :D

I also realized that I've been an idiot. They have to build something on the gold mine, anyway, so I didn't need to worry about being able to target Mines, just friendly structures and trees XD. Ah well, thanks for all the help!
 
Status
Not open for further replies.
Top