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

Unit Group

Status
Not open for further replies.
Level 2
Joined
Jun 9, 2009
Messages
19
I'm making an ability that teleports my caster to wherever I select (Like Blink) and damage enemies for 15% of the casters HP, but when I make the ability I get stumped on how come it does 5 damage to just him.

This is the trigger I use to make units around him take damage.

  • Events
  • Unit - A unit Finishes casting an ability
  • Conditions
  • (((Triggering unit) is A Hero) Equal to True) and ((Ability being cast) Equal to ***)
  • Actions
  • Cause (Triggering unit) to damage circular area after 0.01 seconds of radius 500.00 at (Position of (Triggering unit)), dealing ((Percentage life of (triggering unit)) - 85.00) damage of attack type Spells and damage type Normal
Thanks for the help:thumbs_up:

EDIT: I dont know why it made me put this in "Unit Group".. sorry for any confusion.
 
You should NOT use the "Damage Area" action as this can cause your unit to damage itself, allies, and even friends, including, BUILDINGS !
You should use "Damage Target", that "Target" can be referred as "Picked unit" from reference of Unit Group Action, Pick every unit in...
 
You have written >percentage< life of caster - 85, that's a number between 0 and 100 - 85, meaning a constant max result of 15. How can the max result be constant if you want to make it depend it on the caster's hitpoints and not upper-bounded?

You have not included the caster's absolute hitpoints. Try it with 15% * absolute hitpoints.
 
You should NOT use the "Damage Area" action as this can cause your unit to damage itself, allies, and even friends, including, BUILDINGS !
You should use "Damage Target", that "Target" can be referred as "Picked unit" from reference of Unit Group Action, Pick every unit in...

Is there any way to make it so it doesn't hurt his allies?
 
Is there any way to make it so it doesn't hurt his allies?

This is an example, showing an area of effect (AOE) damaging spell
The important thing to insert in an AOE-type spell, that doesn't hurt building or allies, is this:
  • Unit Group - Pick every unit in (Units within 600.00 of CasterLocation matching (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True)) and do (Actions)
    • Loop - Actions
      • Unit - Cause (Triggering unit) to damage (Picked unit), dealing 50.00 damage of attack type Spells and damage type Normal
      • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
      • Special Effect - Destroy (Last created special effect)
Unit Group Action, with the Condition "(((Matching unit) belongs to an enemy of (Owner of (Triggering unit)))", this.
 

Attachments

Status
Not open for further replies.
Back
Top