• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Trigger] Charge spell doing no damage

Not open for further replies.
Level 3
Oct 6, 2007
So, basicly this spell makes a hero charge towards target point and SHOULD do damage when moving, but the spell doesn't deal any damage for some reason, could anyone explain me why?

  • Heroic Charge
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Heroic Charge
    • Actions
      • Set ChargeDmgAmount = ((Real((Level of Heroic Charge for Charge_caster))) x 10.00)
      • Set Charge_caster = (Casting unit)
      • Set Charge_cast_location = (Target point of ability being cast)
      • Set Charge_cast_point = (Position of Charge_caster)
      • Set charge_time_to_wait = ((Distance between Charge_cast_location and Charge_cast_point) / 1000.00)
      • Special Effect - Create a special effect attached to the origin of Charge_caster using Abilities\Spells\Orc\Shockwave\ShockwaveMissile.mdl
      • Set Charge_Effect = (Last created special effect)
      • Unit - Make Charge_caster Invulnerable
      • Trigger - Turn on HG <gen>
      • Wait charge_time_to_wait seconds
      • Trigger - Turn off HG <gen>
      • Unit - Make Charge_caster Vulnerable
      • Special Effect - Destroy Charge_Effect
      • Custom script: call RemoveLocation(udg_Charge_cast_point)
      • Custom script: call RemoveLocation(udg_Charge_cast_location)
      • Set Charge_caster = No unit

  • HG
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • Set Charge_caster_temp_point = (Position of Charge_caster)
      • Set Charge_DmgAreaSecondary = (Units within 250.00 of Charge_caster_temp_point)
      • Unit Group - Pick every unit in Charge_DmgAreaSecondary and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) belongs to an enemy of (Owner of Charge_caster)) Equal to True
            • Then - Actions
              • Unit - Cause Charge_caster to damage (Picked unit), dealing ChargeDmgAmount damage of attack type Spells and damage type Normal
            • Else - Actions
      • Unit - Move Charge_caster instantly to (Charge_caster_temp_point offset by 50.00 towards (Angle from Charge_caster_temp_point to Charge_cast_location) degrees)
      • Custom script: call RemoveLocation(udg_Charge_caster_temp_point)
      • Custom script: call DestroyGroup(udg_Charge_DmgAreaSecondary)
Level 6
Jul 22, 2008
I'm not too sure about this... but shouldn't you empty the group instead of destroying it; Seeing as it's a global?

Correct me if I'm wrong ;)
Not open for further replies.