[Spell] Hellfire Blast

Level 25
Joined
Sep 7, 2018
Messages
539
hi guys i made Hellfire Blast ability, please check it, have i done it correctly? thanks.
  • Hellfire Blast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Hellfire Blast
    • Actions
      • Custom script: local unit t = GetSpellTargetUnit()
      • Custom script: set udg_Targeted = t
      • Wait until ((Targeted has buff Stunned (Pause)) Equal to True), checking every 0.10 seconds
      • Set TargetLoc = (Position of Targeted)
      • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at TargetLoc facing Default building facing degrees
      • Set Dummy = (Last created unit)
      • Unit - Add Hellfire Blast (Damage) to Dummy
      • Unit - Set level of Hellfire Blast (Damage) for Dummy to (Level of Hellfire Blast for (Triggering unit))
      • Unit - Order Dummy to Night Elf Warden - Shadow Strike Targeted
      • Unit - Add a 0.20 second Generic expiration timer to Dummy
      • -------- Damage over time --------
      • Custom script: call UnitDamageTargetBJ( GetTriggerUnit(), t, 20.00, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
      • Wait 1.00 seconds
      • Custom script: call UnitDamageTargetBJ( GetTriggerUnit(), t, 20.00, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
      • Wait 1.00 seconds
      • Custom script: call UnitDamageTargetBJ( GetTriggerUnit(), t, 20.00, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
      • Wait 1.00 seconds
      • Custom script: call UnitDamageTargetBJ( GetTriggerUnit(), t, 20.00, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
      • -------- Remove Leak --------
      • Custom script: call RemoveLocation(udg_TargetLoc)
      • Custom script: set t = null
      • Custom script: set udg_Targeted = null
      • Custom script: set udg_TargetLoc = null
      • Custom script: set udg_Dummy = null
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
Unfortunately, that's breaking most of the rules for what's considered "working correctly". It should technically work but for all of the wrong reasons and not without potential issues.
  • Currently only one instance can be active at a time for it to work properly. The attempt to use local variables to avoid this issue is a good start but Targeted and TempLoc are still acting as global variables. Regardless, this is not a recommended solution.
  • The unit can be stunned from a different ability that uses the Stunned (Pause) buff. Also, the Wait check is every 0.10 seconds which has the potential to miss the buff. That's unlikely to happen, but this shouldn't be something that we have to worry about.
  • You're Removing TargetLoc after Waits, that's not safe since it can change during that period of time.
  • You're Nulling global variables, there's no good reason to do this.
  • Waits are generally bad practice. They're imprecise, they can run while the game is Paused (use Wait Game-Time to avoid that), and can't be cancelled or paused like a Timer. A "one time" cinematic is a good place to use a Wait, a custom spell that can fire multiple times in a row is not.
  • The Dummy unit is removed from the game after 0.20 seconds, potentially causing issues if Shadow Strike relies on the caster.
Fixes:
I recommend this system for handling custom triggered Missiles (see my 1st post): [Spell] - Phoenix Fire replacement
I recommend using Unit Indexing to handle the damage over time effect once the Missile hits it's target. Or use another system that does all of the hard work for you: DamageOverTime v1.3
 
Last edited:
Level 25
Joined
Sep 7, 2018
Messages
539
Unfortunately, that's breaking most of the rules for what's considered "working correctly". It should technically work but for all of the wrong reasons and not without potential issues.
  • Currently only one instance can be active at a time for it to work properly. The attempt to use local variables to avoid this issue is a good start but Targeted and TempLoc are still acting as global variables. Regardless, this is not a recommended solution.
  • The unit can be stunned from a different ability that uses the Stunned (Pause) buff. Also, the Wait check is every 0.10 seconds which has the potential to miss the buff. That's unlikely but this shouldn't be something that we have to worry about.
  • You're Removing TargetLoc after Waits, that's not safe since it can change during that period of time.
  • You're Nulling global variables, there's no good reason to do this.
  • Waits are generally bad practice. They're imprecise, they can run while the game is Paused (use Wait Game-Time to avoid that), and can't be cancelled or paused like a Timer. A "one time" cinematic is a good place to use a Wait, a custom spell that can fire multiple times in a row is not.
  • The Dummy unit is removed from the game after 0.20 seconds, potentially causing issues if Shadow Strike relies on the caster.
Fixes:
I recommend this system for handling custom triggered Missiles (see my 1st post): [Spell] - Phoenix Fire replacement
I recommend using Unit Indexing to handle the damage over time effect once the Missile hits it's target. Or use another system that does all of the hard work for you: DamageOverTime v1.3
Thanks
 
Level 25
Joined
Sep 7, 2018
Messages
539
@Uncle is it better now? thanks for your help.
  • Hellfire Blast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Hellfire Blast
    • Actions
      • Custom script: local unit t = GetSpellTargetUnit()
      • Custom script: local location point = GetUnitLoc(GetSpellTargetUnit())
      • Custom script: set udg_Targeted = t
      • Wait until (((Targeted has buff Stunned (Pause)) Equal to True) or (((Triggering unit) has buff Stunned) Equal to True)), checking every 0.10 seconds
      • Custom script: set udg_TargetLoc = point
      • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at TargetLoc facing Default building facing degrees
      • Set Dummy = (Last created unit)
      • Unit - Add Hellfire Blast (Damage) to Dummy
      • Unit - Set level of Hellfire Blast (Damage) for Dummy to (Level of Hellfire Blast for (Triggering unit))
      • Unit - Order Dummy to Night Elf Warden - Shadow Strike Targeted
      • Unit - Add a 2.00 second Generic expiration timer to Dummy
      • -------- Damage over time --------
      • Custom script: call UnitDamageTargetBJ( GetTriggerUnit(), t, 20.00, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
      • Wait 1.00 game-time seconds
      • Custom script: call UnitDamageTargetBJ( GetTriggerUnit(), t, 20.00, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
      • Wait 1.00 game-time seconds
      • Custom script: call UnitDamageTargetBJ( GetTriggerUnit(), t, 20.00, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
      • Wait 1.00 game-time seconds
      • Custom script: call UnitDamageTargetBJ( GetTriggerUnit(), t, 20.00, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
      • -------- Remove Leak --------
      • Custom script: call RemoveLocation(udg_TargetLoc)
      • Custom script: set t = null
      • Custom script: set point = null
 
Last edited:
Level 25
Joined
Sep 7, 2018
Messages
539
No, it's still making the same mistakes.
  • Wait until (((Targeted has buff Stunned (Pause)) Equal to True) or (((Triggering unit) has buff Stunned) Equal to True)), checking every 0.10 seconds
  • Unit - Add a 2.00 second Generic expiration timer to Dummy
i edited buff event and dummy time but for damage over time i'm noob :grin: i couldn't use damage over time but i tested it in multi caster and it worked.
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
That's some old DotA info, he doesn't have the damage over time or anything like that.

I show how to do Damage over time here:

Or use a system that does the work for you.
 
Level 25
Joined
Sep 7, 2018
Messages
539
That's some old DotA info, he doesn't have the damage over time or anything like that.

I show how to do Damage over time here:

Or use a system that does the work for you.
thank you again, this system is suitable for me.
 
Top