• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

Aoe spell to delete corpses in a region?

Status
Not open for further replies.
Level 4
Joined
Nov 3, 2006
Messages
61
Hi guys this probably has a very simple solution but ive been at it for hours and im stumped lol. What the deal is is that im trying to script an aoe spell which deletes corpses so long as the corpses are in a certain region e.g deletes all corpses inside the aoe spell if they are in the region, if they arent in the region the spell does nothing. Any help would be great!
 
Enumerate units that are dead. Then use Remove Unit to remove the corpse.

Ex:
  • Set TempLoc = (Target point of ability being cast)
  • Custom script: set bj_wantDestroyGroup = true
  • Unit Group - Pick every unit in (Units within 512.00 of TempLoc matching (((Matching unit) is dead) Equal to True)) and do (Actions)
    • Loop - Actions
      • Unit - Remove (Picked unit) from the game
  • Custom script: call RemoveLocation(udg_TempLoc)
Note that this will remove any dead unit, meaning it will remove units that died before they may have decayed. I can't think of an easy way to tell if the unit is decaying or not.
 
hi, thanks for the help! well ive had a mess around with it and so far ive found there are gui triggers which check whether a unit is "decaying" however the main problem im encountering is that i need a dummy spell which targets corpses because if i can get a spell which does that i can use that condition to check if the unit is decaying which means the triggers will only affect the corpses. Well this is my theory but before i can test it i need a way to target the corpses :\... ive been messing around with the targets allowed sections of spells however i currently havent gotten any spells to do so any ideas?
 
Hey thanks for the response, however ive already tried a mechanic with raise dead and it seems as if the spell has no option but to summon units (you cant choose whether they are summoned or not just which units are summoned). Also I forgot to mention this spell is intended for a non hero unit which means I cant use animate dead. By aoe by the way i meant an ordinance based spell such as blizzard or rain of fire. :\ im really looking into this whole spell allowable target thing just by the name it seems as if thats the property i need to change but i just cant seem to get it right, does anyone have an in depth understanding of that option?
 
Status
Not open for further replies.
Back
Top