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

Cropse Target

Status
Not open for further replies.
Level 10
Joined
Aug 8, 2004
Messages
562
is there any way i can get and ability that can only target corpses, not an ability that effects a random corpse but one that is targetable.
i made it so the ability says when u use it " Must Target A Corpse" but when i click a corpse it comes up with the same mesage....
PLEASE HELP!!!
 
Level 2
Joined
Jul 25, 2005
Messages
15
"Dead" units could be reincarnating units or stuff that is still alive so this is impossible
 
Level 11
Joined
Jul 20, 2004
Messages
2,760
Reicarnate? Mostly improbable. Mostly heroes reincarnate (though it obviously can be used on normal unit). However, here is a simple yet efficient method:

Use channel with 0.01 duration and make it target a point. And now:

Event - An Unit Begins Casting an Ability
Conditions - Ability Being Cast equal to YourAbility

set var = pick a random unit within 50 range of the point matching condition ((Matching Unit) is Dead equal to true and (Matching Unit) is a Hero equal to false and (matching Unit) is a Structure equal to false)

And then you can of course check if var is null. And if it is you stop the caster immediately and write an error message. If not you remove var unit and do your spell. Don't forget to set var to null at the end of the trigger.

~Daelin
 
Level 13
Joined
Dec 29, 2004
Messages
597
How bout this, make spell based on target-position spell (e.g. Carrion Swarm) then when a unit start casting an ability, do:

set var = pick a random unit within 50 range of the target point of ability being cast matching condition ((Matching Unit) is Dead equal to true and (Matching Unit) is a Hero equal to false and (matching Unit) is a Structure equal to false)
/* same with Daelin though */

if var not equal to nothing then
--------spell action--------
else
--------message-------------


Just to make it clear.
 
Status
Not open for further replies.
Top