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

[Solved] My spell kills it's Caster

Status
Not open for further replies.
Level 8
Joined
Jul 10, 2018
Messages
383
Hi I have an issue with my spell after it damage the area it kills it's Caster for some reason heres the code

  • Flower more stuf
    • Events
      • Time - Every 0.02 seconds of game time
    • Conditions
    • Actions
      • Set Flower_int = (Flower_int + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Flower_int Less than or equal to 24
        • Then - Actions
          • Set Flower_distance = (Flower_distance + 30.00)
          • Set Flower_angle = (Flower_angle - 25.00)
          • For each (Integer Flower_loop) from 1 to 6, do (Actions)
            • Loop - Actions
              • Set Flower_angle = (Flower_angle + 60.00)
              • Set Flower_aux = (Flower_center offset by Flower_distance towards (Flower_angle + 0.00) degrees)
              • Special Effect - Create a special effect at Flower_aux using Abilities\Spells\Other\Doom\DoomDeath.mdl
              • Unit - Cause Flower_caster to damage circular area after 0.00 seconds of radius 500.00 at (Target point of ability being cast), dealing (Percentage life of (Triggering unit)) damage of attack type Spells and damage type Normal
              • Special Effect - Destroy (Last created special effect)
              • Custom script: call RemoveLocation(udg_Flower_aux)
        • Else - Actions
          • Set Flower_angle = 0.00
          • Set Flower_distance = 0.00
          • Trigger - Turn off (This trigger)
          • Set Flower_int = 0
          • Custom script: call RemoveLocation(udg_Flower_center)
 
Level 8
Joined
Jul 10, 2018
Messages
383
Damage area function has no filtering and hits EVERY unit in the area (allies and self included). Instead set a unit group to the right type of units in the area, then loop through them and damage them all individually. Pretty much never use the damage area function.
Sooo you mean

Pick every unit group owned by player and damage target?
 
Status
Not open for further replies.
Top