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

DotA's Ancient Apparition Freezing HP?

Status
Not open for further replies.
Level 3
Joined
Jun 17, 2015
Messages
53
I did searches the forum for the HP Freezing, but seem like nobody did that before, so i post this thread to people who are searching with me will find.

-The freezing works like when it started, it saves the HP of affected enemies to a MUI Variable
(example is 100HP)

-Maybe there's a timer that check every 0.10s, if life of Affected Units are greater than saved variable, set it to saved Variable
(if HP is greater than 100, set it to 100)

-If life of Affected Units is lower than saved Variable, set the Saved Variable to lower (if saved value is 100, life of unit is 90 now -> set the value to 90)

but idk how to make this MUI, this is my explain for DotA's Freezing HP. Can somebody help me to make this trigger xD ?
 
Last edited:
Level 25
Joined
Jul 10, 2006
Messages
3,315
You've got the general idea right, to make it MUI you can either use a unit indexer with an array variable or a hashtable.

Array style:
1. Put a unit indexer in your map to automatically give each unit a unique custom value.
2. Save the unit's hp to real variable FreezingHP[custom value of unit], compare to this variable in your loop check.
 
Level 3
Joined
Jun 17, 2015
Messages
53
well i still dont know much about Hastable and array variable. Then maybe u can make a sample map?

It's Devotion Aura targets to allied and friends, not self.
(The targets make me able to test freezing HP with heals)
 
Level 3
Joined
Jun 17, 2015
Messages
53
@ivofena: yes man :p this is almost like what i explain.

But im trying to change it to Aura Type instead of Casting Spell. So maybe i move these actions...

  • Actions
    • Set Caster_Location = (Position of (Triggering unit))
    • Set Cast_Group = (Units within 600.00 of Caster_Location)
    • Custom script: call RemoveLocation(udg_Caster_Location)
    • Unit Group - Pick every unit in Cast_Group and do (Actions)
      • Loop - Actions
        • Set Spell_Index = (Spell_Index + 1)
        • Set Spell_Target[Spell_Index] = (Picked unit)
        • Set Spell_Target_HP[Spell_Index] = (Life of (Picked unit))
          • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Loop <gen> is on) Equal to (==) False
            • Then - Actions
              • Trigger - Turn on Loop <gen>
            • Else - Actions
              • Do nothing
    • Custom script: call DestroyGroup(udg_Cast_Group)


...to the Loop to make it like Aura-type ?
 
Level 5
Joined
Jan 17, 2014
Messages
131
@ivofena: yes man :p this is almost like what i explain.

But im trying to change it to Aura Type instead of Casting Spell. So maybe i move these actions...

  • Actions
    • Set Caster_Location = (Position of (Triggering unit))
    • Set Cast_Group = (Units within 600.00 of Caster_Location)
    • Custom script: call RemoveLocation(udg_Caster_Location)
    • Unit Group - Pick every unit in Cast_Group and do (Actions)
      • Loop - Actions
        • Set Spell_Index = (Spell_Index + 1)
        • Set Spell_Target[Spell_Index] = (Picked unit)
        • Set Spell_Target_HP[Spell_Index] = (Life of (Picked unit))
          • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Loop <gen> is on) Equal to (==) False
            • Then - Actions
              • Trigger - Turn on Loop <gen>
            • Else - Actions
              • Do nothing
    • Custom script: call DestroyGroup(udg_Cast_Group)


...to the Loop to make it like Aura-type ?

No, if you want to make it an aura, you'll have to use a different method. Give me a little time to re-make it into an aura ok? :)
 
Level 3
Joined
Jun 17, 2015
Messages
53
thank you very much for this, this is exactly what im looking for.

Thanks again for you made it clearly and your enthusiasm about helping :p
 
Status
Not open for further replies.
Top