• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] AoE damage spell based on intelingence ?

Status
Not open for further replies.
Level 22
Joined
Dec 31, 2006
Messages
2,216
Here:
  • AoE Damage
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Your Ability
    • Actions
      • Set Caster = (Triggering Unit)
      • Set Player = (Owner of Caster)
      • Set Point = (Target point of ability being cast)
      • Set Group = (Units within 300.00 of Point matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of Player) Equal to True)))
      • Unit Group - Pick every unit in Group and do (Actions)
        • Loop - Actions
          • Set Target = (Picked unit)
          • Unit - Cause Caster to damage Target, dealing ((Real((Intelligence of Caster (Include bonuses)))) x 2.00) damage of attack type Spells and damage type Normal
      • Custom script: call DestroyGroup(udg_Group)
      • Custom script: call RemoveLocation(udg_Point)
Whenever you cast the correct spell your hero will deal damage to units within 300 of the target point and deal int * 2.
 
Last edited:
Level 29
Joined
Jul 29, 2007
Messages
5,174

You do not need to null globals (remove locations and destroy groups, but don't nullthe variables, as they are only pointers and they are rewritten).
Do not use casting unit. Triggering Unit is the best form (it is a local to the trigger if it means anything to you).
What's the point of "Cause unit to damage area" if you don't use it ?
 
Status
Not open for further replies.
Top