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

Simple MUI heal over time spell

Status
Not open for further replies.
Level 3
Joined
Jul 25, 2014
Messages
31
As the title says, I need a very simple spell:

Heal unit for 1.66 x HeroIntelligence each second for 12 seconds.



I don't know how to make it MUI so it can be cast on two units at the same time, looked everywhere and couldn't find an answer to this simple question. I tried some tutorials but they are different and don't work for "Every 1.00 seconds of game time" loop I tried this with.

Thanks in advance
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
Effect Over Time System

  • Heal
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to HealOverTime
    • Actions
      • Custom script: call EOT_Set_Default_Variables()
      • Set EOT_Param_Source = (Triggering unit)
      • Set EOT_Param_Target = (Triggering unit)
      • -------- or use (Targeted Unit Of Ability Being Cast) --------
      • Set EOT_Param_Duration = 12.00
      • Set EOT_Param_Interval = 1.00
      • Set EOT_Param_Buff = Custom HealOverTime
      • Set EOT_Param_Buff_Holder = HealOverTime (Buff Holder)
      • Set TempAbility = (Ability being cast)
      • Custom script: set udg_TempInteger = udg_TempAbility
      • Set EOT_Param_Type = (Real(TempInteger))
      • Set EOT_Param_Positive = True
      • Trigger - Run EOT_Trigger_Create_EOT (ignoring conditions)
  • Heal Interval
    • Events
      • Game - EOT_Event_On_Interval becomes Equal to 0.00
    • Conditions
    • Actions
      • Set TempAbility = HealOverTime
      • Custom script: set udg_TempInteger = udg_TempAbility
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • EOT_Param_Type Equal to (Real(TempInteger))
        • Then - Actions
          • Set TempReal = (1.66 x (Real((Intelligence of EOT_Param_Source (Include bonuses)))))
          • Unit - Set life of EOT_Param_Target to ((Life of EOT_Param_Target) + TempReal)
        • Else - Actions
This one heals the hero for 1.66 * intelligence that is calculated on each interval.

  • Heal
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to HealOverTime
    • Actions
      • Custom script: call EOT_Set_Default_Variables()
      • Set EOT_Param_Source = (Triggering unit)
      • Set EOT_Param_Target = (Triggering unit)
      • -------- or use (Targeted Unit Of Ability Being Cast) --------
      • Set EOT_Param_Duration = 12.00
      • Set EOT_Param_Interval = 1.00
      • Set EOT_Param_Buff = Custom HealOverTime
      • Set EOT_Param_Buff_Holder = HealOverTime (Buff Holder)
      • Set TempAbility = (Ability being cast)
      • Custom script: set udg_TempInteger = udg_TempAbility
      • Set EOT_Param_Type = (Real(TempInteger))
      • Set EOT_Param_Positive = True
      • Trigger - Run EOT_Trigger_Create_EOT (ignoring conditions)
      • Set TempReal = (1.66 x (Real((Intelligence of EOT_Param_Source (Include bonuses)))))
      • Custom script: call EOT_Save_Real(0, udg_TempReal)
  • Heal Interval
    • Events
      • Game - EOT_Event_On_Interval becomes Equal to 0.00
    • Conditions
    • Actions
      • Set TempAbility = HealOverTime
      • Custom script: set udg_TempInteger = udg_TempAbility
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • EOT_Param_Type Equal to (Real(TempInteger))
        • Then - Actions
          • Custom script: set udg_TempReal = EOT_Load_Real(0)
          • Unit - Set life of EOT_Param_Target to ((Life of EOT_Param_Target) + TempReal)
        • Else - Actions
If the Buff and Buff_Holder confuses you... check out the examples and the abilities in the object editor.
They are to display a buff.
If you don't want a buff then remove those two lines and set EOT_Param_Hidden to true instead.
 
Level 3
Joined
Jul 25, 2014
Messages
31
Thank you guys, I finally made it :) Damn I love this site so much, I'm kinda mad I didn't discover it years earlier :p

Here I will post my final trigger (I hope it's correct), if anyone else searches for this problem in the future:

NOTE:

-I based the dummy spell on Rejuvenation (atm it will heal 12 hit points over 12 seconds in addition to triggered spell so I can balance it easier), it also gives the buff with effect
-I made the spell dispellable, so the trigger will stop when the buff is dispelled
-I maybe messed up the math, because Level 1 Regrowth cast by Level 10 Furion (42 Intelligence) heals the target for 766 instead of 660, I can't figure out what's wrong
-Everything else seems to be working perfectly

2zgt4r4.jpg


Cheers!
 

Attachments

  • Regrowth.jpg
    Regrowth.jpg
    420.3 KB · Views: 226
Level 3
Joined
Jul 25, 2014
Messages
31
It's the periodic timer.

It's because you have it set to 0.30 instead of 1 second which makes it heal targets more frequently.

I suggest you use 1 second periodic timer. Nothing wrong with that. Even Blizzard's auras don't disappear immediately if they get removed.

Yeah, but I divided each multiplying number in the code by three, so it would give same results as it was 1 second timer. I tried it also with 1 second and still it doesn't give me exact accurate results.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
That is the problem.

What is 1 divided by 3?
(((0.33)))

What you have to do is multiply it with 0.3 instead of dividing by 3.
Those calculation are always right.
(Also don't be afraid that the healing will be slightly more. Hp Regen also does a great job.)
 
Status
Not open for further replies.
Top