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

"Glaciate" Spell that works similar to Impale, spell request

Status
Not open for further replies.
Level 4
Joined
May 1, 2004
Messages
59
Hi all the spell gurus on Hive! Could someone please help me make a "Glaciate" spell that works kinda like Impale, except it doesn't toss units into the air, but freezes them in place, the KEY is to have ANIMATION STOPPED for the affected units as well.

I'm really bad at MUI spell with duration overtime and as a result could never make this spell dream-come-true. Hope someone here could meet this challenge with ease?

Some details:

1)The spell is Target-point
It casts like impale, you aim at a direction, then a couple of "Frost Nova" effect will erupt forward in a line, damaging and freezing units along the way.
2) The units affected will have the "Freezing Breath" buff effect, then the KEY is to have the units animation STOPPED over an configurable amount of time, then animation resumed after the buff duration is over.
3) If possible, I hope there could be an option here where the unit's hit point regeneration is paused, or receiving minor DOT, but these are not essential.
4) Target affected: Ground, Enemy, Neutral. I hope the targets could include structures and mechanical units as well, coz in the end its called "Glaciate", so everything must freeze right ;) maybe the affected building will not receive damage but will be non-functional.

Things to be aware of: Like Impale or Carrion Swarm, units in a line are not affected instantly at once, but are affected as the spell effect travel forth in milliseconds. So I believe the loop should create a "Frost Nova" effect every 0.X seconds while grouping units within say 200 AOE of the effect to be affected by the buff. The buff part is where I just couldn't get it to work with my limited trigger editing skills.


If done right I believe the spell could be very useful to many people who have Lich King in their map ;) So I really hope someone could be up for this, thanks ahead!
 
Level 10
Joined
Apr 4, 2010
Messages
509
Here's some necro help :alol:
The spell has a minor issue though,
If Player A casts it on Unit A
Unit A takes damage and gets frozen,
Then if Player B comes along then casts it on Unit A.
Unit A takes DoT from both players. So even though Player B replaced the buff, Player A is still doing Damage, I could fix this issue but I'm too lazy. As you requested, the DoT can be toggled off, so if this issue bothers you, you can switch it off. Also I could not do the regen/healing freeze, you need another system for that.
attachment.php

  • Glaciate Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- ----------------------------------------------------- --------
      • -------- These are the 2 abilites and buff involved in the spell. --------
      • Set GC_AbilityMain = Glaciate
      • Set GC_AbiliyDummy = Glaciate (Dummy Stun)
      • Set GC_Buff = Glaciate
      • -------- ----------------------------------------------------- --------
      • -------- This is the special effect created at each explosion. --------
      • Set GC_SPFX_Type = Abilities\Spells\Undead\FrostNova\FrostNovaTarget.mdl
      • -------- ----------------------------------------------------- --------
      • -------- This is the damage per level, CG_Config_Damage[1] is level one damage etc. The following varaibles are set this way too. --------
      • Set GC_Config_Damage[1] = 100.00
      • Set GC_Config_Damage[2] = 200.00
      • Set GC_Config_Damage[3] = 300.00
      • -------- ----------------------------------------------------- --------
      • Set GC_Config_DOT_Damage[1] = 10.00
      • Set GC_Config_DOT_Damage[2] = 20.00
      • Set GC_Config_DOT_Damage[3] = 30.00
      • -------- ----------------------------------------------------- --------
      • Set GC_Config_AoE[1] = 200.00
      • Set GC_Config_AoE[2] = 200.00
      • Set GC_Config_AoE[3] = 200.00
      • -------- ----------------------------------------------------- --------
      • Set GC_Config_DelayInBetween[1] = 0.10
      • Set GC_Config_DelayInBetween[2] = 0.10
      • Set GC_Config_DelayInBetween[3] = 0.10
      • -------- ----------------------------------------------------- --------
      • Set GC_Config_PulseAmount[1] = 5
      • Set GC_Config_PulseAmount[2] = 6
      • Set GC_Config_PulseAmount[3] = 7
  • Glaciate
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to GC_AbilityMain
    • Actions
      • -------- ----------------------------------------------------- --------
      • -------- Setting in all the variables --------
      • Set GC_Index = (GC_Index + 1)
      • Set GC_Caster[GC_Index] = (Casting unit)
      • Set GC_LevelOfAbility[GC_Index] = (Level of GC_AbilityMain for GC_Caster[GC_Index])
      • Set GC_DelayTimer[GC_Index] = 0.00
      • Set GC_DamagedGroup[GC_Index] = (Random 1 units from (Units in (Playable map area)))
      • Unit Group - Remove all units from GC_DamagedGroup[GC_Index]
      • Set GC_DelayTimer[GC_Index] = 0.00
      • Set GC_PulseAmount[GC_Index] = GC_Config_PulseAmount[GC_LevelOfAbility[GC_Index]]
      • Set GC_OffSetPerPulse[GC_Index] = (GC_Config_AoE[GC_LevelOfAbility[GC_Index]] x 1.00)
      • Set GC_ToggleDOT[GC_Index] = False
      • Set GC_ToggleStopHealing[GC_Index] = True
      • -------- ----------------------------------------------------- --------
      • Set GC_TempPoint[0] = (Position of GC_Caster[GC_Index])
      • Unit - Create 1 Dummy for (Owner of GC_Caster[GC_Index]) at GC_TempPoint[0] facing Default building facing degrees
      • Set GC_StunDummy[GC_Index] = (Last created unit)
      • Unit - Add GC_AbiliyDummy to GC_StunDummy[GC_Index]
      • Unit - Set level of GC_AbiliyDummy for GC_StunDummy[GC_Index] to GC_LevelOfAbility[GC_Index]
      • Set GC_TempPoint[1] = (Target point of ability being cast)
      • Set GC_Angle[GC_Index] = (Angle from GC_TempPoint[0] to GC_TempPoint[1])
      • Set GC_Point[GC_Index] = (GC_TempPoint[0] offset by GC_OffSetPerPulse[GC_Index] towards GC_Angle[GC_Index] degrees)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • GC_Index Equal to 1
        • Then - Actions
          • Trigger - Turn on Glaciate Loop <gen>
        • Else - Actions
      • -------- ----------------------------------------------------- --------
      • -------- Clearing leaks. --------
      • Custom script: call RemoveLocation (udg_GC_TempPoint[0])
      • Custom script: call RemoveLocation (udg_GC_TempPoint[1])
  • Glaciate Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer GC_Loop) from 1 to GC_Index, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • GC_DelayTimer[GC_Loop] Less than or equal to 0.00
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • GC_PulseAmount[GC_Loop] Greater than or equal to 1
                • Then - Actions
                  • Set GC_DelayTimer[GC_Loop] = GC_Config_DelayInBetween[GC_LevelOfAbility[GC_Loop]]
                  • Set GC_PulseAmount[GC_Loop] = (GC_PulseAmount[GC_Loop] - 1)
                  • Special Effect - Create a special effect at GC_Point[GC_Loop] using GC_SPFX_Type
                  • Special Effect - Destroy (Last created special effect)
                  • Set GC_TempGroup = (Units within GC_Config_AoE[GC_LevelOfAbility[GC_Loop]] of GC_Point[GC_Loop] matching (((Matching unit) belongs to an enemy of (Owner of GC_Caster[GC_Loop])) Equal to True))
                  • Unit Group - Pick every unit in GC_TempGroup and do (Actions)
                    • Loop - Actions
                      • Set GC_TempTarget = (Picked unit)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • And - All (Conditions) are true
                            • Conditions
                              • (GC_TempTarget is alive) Equal to True
                              • (GC_TempTarget is Magic Immune) Equal to False
                              • (GC_TempTarget is in GC_DamagedGroup[GC_Loop]) Equal to False
                        • Then - Actions
                          • Unit - Cause GC_Caster[GC_Loop] to damage GC_TempTarget, dealing GC_Config_Damage[GC_LevelOfAbility[GC_Loop]] damage of attack type Spells and damage type Normal
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (GC_TempTarget is alive) Equal to True
                            • Then - Actions
                              • Animation - Change GC_TempTarget's animation speed to 0.00% of its original speed
                              • Unit - Order GC_StunDummy[GC_Loop] to Neutral - Firebolt GC_TempTarget
                              • Unit Group - Add GC_TempTarget to GC_DamagedGroup[GC_Loop]
                            • Else - Actions
                        • Else - Actions
                  • Set GC_TempPoint[2] = GC_Point[GC_Loop]
                  • Set GC_Point[GC_Loop] = (GC_TempPoint[2] offset by GC_OffSetPerPulse[GC_Loop] towards GC_Angle[GC_Loop] degrees)
                  • Custom script: call RemoveLocation (udg_GC_TempPoint[2])
                  • Custom script: call DestroyGroup (udg_GC_TempGroup)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • And - All (Conditions) are true
                        • Conditions
                          • GC_PulseAmount[GC_Loop] Less than or equal to 0
                    • Then - Actions
                      • Unit - Remove GC_StunDummy[GC_Loop] from the game
                      • Custom script: call RemoveLocation (udg_GC_Point[udg_GC_Loop])
                    • Else - Actions
                • Else - Actions
            • Else - Actions
              • Set GC_DelayTimer[GC_Loop] = (GC_DelayTimer[GC_Loop] - 0.03)
          • Unit Group - Pick every unit in GC_DamagedGroup[GC_Loop] and do (Actions)
            • Loop - Actions
              • Set GC_TempTarget = (Picked unit)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • And - All (Conditions) are true
                    • Conditions
                      • (GC_TempTarget is alive) Equal to True
                      • (GC_TempTarget is Magic Immune) Equal to False
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • GC_ToggleDOT[GC_Loop] Equal to True
                    • Then - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (GC_TempTarget has buff GC_Buff) Equal to True
                        • Then - Actions
                          • Unit - Cause GC_Caster[GC_Loop] to damage GC_TempTarget, dealing (GC_Config_DOT_Damage[GC_LevelOfAbility[GC_Loop]] x 0.03) damage of attack type Spells and damage type Normal
                        • Else - Actions
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • GC_ToggleDOT[GC_Loop] Equal to True
                    • Then - Actions
                      • -------- Add Unit to Hp&Regen Pause System --------
                    • Else - Actions
                • Else - Actions
                  • Unit Group - Remove GC_TempTarget from GC_DamagedGroup[GC_Loop]
                  • Animation - Change GC_TempTarget's animation speed to 100.00% of its original speed
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • GC_PulseAmount[GC_Loop] Less than or equal to 0
            • Then - Actions
              • Set GC_GroupCounter = (Number of units in GC_DamagedGroup[GC_Loop])
              • Set GC_BuffCounter = 0
              • Unit Group - Pick every unit in GC_DamagedGroup[GC_Loop] and do (Actions)
                • Loop - Actions
                  • Set GC_TempTarget = (Picked unit)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (GC_TempTarget has buff GC_Buff) Equal to False
                    • Then - Actions
                      • Unit Group - Remove GC_TempTarget from GC_DamagedGroup[GC_Loop]
                      • Animation - Change GC_TempTarget's animation speed to 100.00% of its original speed
                      • Set GC_BuffCounter = (GC_BuffCounter + 1)
                    • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • GC_BuffCounter Greater than or equal to GC_GroupCounter
                • Then - Actions
                  • Game - Display to (All players) the text: DE-INDEX
                  • Unit - Remove GC_StunDummy[GC_Loop] from the game
                  • Custom script: call RemoveLocation (udg_GC_Point[udg_GC_Loop])
                  • Custom script: call DestroyGroup (udg_GC_DamagedGroup[udg_GC_Loop])
                  • Set GC_Caster[GC_Loop] = GC_Caster[GC_Index]
                  • Set GC_LevelOfAbility[GC_Loop] = GC_LevelOfAbility[GC_Index]
                  • Set GC_DelayTimer[GC_Loop] = GC_DelayTimer[GC_Index]
                  • Set GC_DamagedGroup[GC_Loop] = GC_DamagedGroup[GC_Index]
                  • Set GC_DelayTimer[GC_Loop] = GC_DelayTimer[GC_Index]
                  • Set GC_PulseAmount[GC_Loop] = GC_PulseAmount[GC_Index]
                  • Set GC_OffSetPerPulse[GC_Loop] = GC_OffSetPerPulse[GC_Index]
                  • Set GC_ToggleDOT[GC_Loop] = GC_ToggleDOT[GC_Index]
                  • Set GC_ToggleStopHealing[GC_Loop] = GC_ToggleStopHealing[GC_Index]
                  • Set GC_StunDummy[GC_Loop] = GC_StunDummy[GC_Index]
                  • Set GC_Angle[GC_Loop] = GC_Angle[GC_Index]
                  • Set GC_Point[GC_Loop] = GC_Point[GC_Index]
                  • Set GC_Index = (GC_Index - 1)
                  • Set GC_Loop = (GC_Loop - 1)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • GC_Index Equal to 0
                    • Then - Actions
                      • Trigger - Turn off Glaciate Loop <gen>
                    • Else - Actions
                • Else - Actions
            • Else - Actions
 

Attachments

  • Glaciate.w3x
    29.3 KB · Views: 35
  • Glaciate.gif
    Glaciate.gif
    2.9 MB · Views: 219
  • Like
Reactions: ILH
Level 4
Joined
May 1, 2004
Messages
59
Wow, thanks man! I almost give up on this spell and stick with the generic impale object editor version.

And yes stacking damage from MPI is not a big issue for me, and you made the DoT toggle-able which is already great~

Had a quick look at the triggers the documentation is very clear~Will test the map soon! THanks alot~
 
Level 37
Joined
Jul 22, 2015
Messages
3,485
In regards to your triggers xD
  • You should preload the dummy and its abilities on Map Init
  • Why do you do this? o_O
    • Set GC_DamagedGroup[GC_Index] = (Random 1 units from (Units in (Playable map area)))
    • Unit Group - Remove all units from GC_DamagedGroup[GC_Index]
  • Here are leaks I've found:
    • Unit group & location - Units in (Playable map area)
      • Set GC_DamagedGroup[GC_Index] = (Random 1 units from (Units in (Playable map area)))
    • Location - Postion of GC_Caster
      • Set GC_TempPoint[0] = (Position of GC_Caster[GC_Index])
  • Save Owner of GC_Caster to a variable
  • You're already filtering them out with ITEs inside the loop, why do you still use Matching Unit?
    • Set GC_TempGroup = (Units within GC_Config_AoE[GC_LevelOfAbility[GC_Loop]] of GC_Point[GC_Loop] matching (((Matching unit) belongs to an enemy of (Owner of GC_Caster[GC_Loop])) Equal to True))
  • Is DamagedGroup only used to make sure units do not get damaged again by an impale of any instance? If so, it doesn't need to be an array
 
Last edited:
Level 10
Joined
Apr 4, 2010
Messages
509
You are better than code than I KILLCIDE :alol:
You should preload the dummy and its abilities on Map Init
What does this mean? Create one dummy for all the spells?
Why do you do this? o_O
  • Set GC_DamagedGroup[GC_Index] = (Random 1 units from (Units in (Playable map area)))
  • Unit Group - Remove all units from GC_DamagedGroup[GC_Index]
I do that to create a new empty group, in your volitile light spell, you do this
  • Custom script: if udg_VL_groupEnemy[udg_VL_indexMax] == null then
  • Custom script: set udg_VL_groupEnemy[udg_VL_indexMax] = CreateGroup()
  • Custom script: endif
I don't know how do that custom code stuff :p
Is DamagedGroup only used to make sure units do not get damaged again by an impale of any instance? If so, it doesn't need to be an array
DamagedGroup is to make sure they don't get damaged again and also it's used to deal the DoT.

Could you show me what would you do to fix the spell? (yiss internet is working again).
 
Level 37
Joined
Jul 22, 2015
Messages
3,485
What does this mean? Create one dummy for all the spells?

All though that is a good alternative, that's not what I meant xD when you first add an ability to a unit, there is a slight lag. To stop that from happening, during Map Init, people will load a dummy, add all its abilities to it, and then remove the dummy.

  • Set tempLoc = (Center of (Playable map area))
  • Unit - Create 1 dummy unit for Neutral Passive at tempLoc facing Default building facing degrees
  • Set tempUnit = (Last created unit)
  • Unit - Add ability to tempUnit
  • -------- add other abilities that this dummy will use --------
  • Unit - Remove tempUnit from the game
  • Custom script: call RemoveLocation(udg_tempLoc)

I do that to create a new empty group, in your volitile light spell, you do this
  • Custom script: if udg_VL_groupEnemy[udg_VL_indexMax] == null then
  • Custom script: set udg_VL_groupEnemy[udg_VL_indexMax] = CreateGroup()
  • Custom script: endif
I don't know how do that custom code stuff :p

I figured that's what you were doing xD I suggest you do the way I did it since it saves you from having to clear the location and group leak with your method.

I actually didn't know about problems unit group arrays cause until PurgeandFire showed me :) credits to him! Read his post to understand the logic behind it.

DamagedGroup is to make sure they don't get damaged again and also it's used to deal the DoT.

Ahh okay. If it were only the former, I would have suggested to just not make DamagedGroup an array :p Does the DoT only happen in intervals?
 
Status
Not open for further replies.
Top