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

Cold Snap v1.0

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
Triggers:


[Trigger="CS"]

CS
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Cold Snap
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Target unit of ability being cast) is in CS_Check) Equal to True
Then - Actions
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
CS_CustomValue Less than or equal to 1000
Then - Actions
Set CS_CustomValue = (CS_CustomValue + 1)
Else - Actions
Set CS_CustomValue = 1
Set CS_Caster[CS_CustomValue] = (Triggering unit)
Set CS_Target[CS_CustomValue] = (Target unit of ability being cast)
Set CS_Damage[CS_CustomValue] = (50.00 + (25.00 x (Real((Level of Cold Snap for CS_Caster[CS_CustomValue])))))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Life of CS_Target[CS_CustomValue]) Less than or equal to CS_Damage[CS_CustomValue]
Then - Actions
Special Effect - Create a special effect attached to the origin of CS_Target[CS_CustomValue] using Abilities\Spells\Undead\FrostNova\FrostNovaTarget.mdl
Special Effect - Destroy (Last created special effect)
Unit - Cause CS_Caster[CS_CustomValue] to damage CS_Target[CS_CustomValue], dealing CS_Damage[CS_CustomValue] damage of attack type Spells and damage type Cold
Else - Actions
Unit Group - Add CS_Target[CS_CustomValue] to CS_Check
Special Effect - Create a special effect attached to the origin of CS_Target[CS_CustomValue] using Abilities\Spells\Undead\FreezingBreath\FreezingBreathTargetArt.mdl
Set CS_SFX[CS_CustomValue] = (Last created special effect)
Set CS_Wait[CS_CustomValue] = 0.00
Set CS_TempPoint = (Center of (Playable map area))
Unit - Create 1 Dummy for (Owner of CS_Caster[CS_CustomValue]) at CS_TempPoint facing Default building facing degrees
Unit - Set the custom value of (Last created unit) to CS_CustomValue
Custom script: call RemoveLocation(udg_CS_TempPoint)
Unit Group - Add (Last created unit) to CS_WaitGroup
[/trigger]



[trigger="CS Casting Time"]

CS Casting Time
Events
Time - Every 0.05 seconds of game time
Conditions
(Number of units in CS_WaitGroup) Greater than 0
Actions
Unit Group - Pick every unit in CS_WaitGroup and do (Actions)
Loop - Actions
Set CS_TempInteger = (Custom value of (Picked unit))
Set CS_Wait[CS_TempInteger] = (CS_Wait[CS_TempInteger] + 0.05)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
CS_Wait[CS_TempInteger] Greater than or equal to 0.50
Then - Actions
Unit - Remove (Picked unit) from the game
Set CS_CurrentTime[CS_TempInteger] = 0.00
Set CS_MaxTime[CS_TempInteger] = (1.00 + (1.00 x (Real((Level of Cold Snap for CS_Caster[CS_TempInteger])))))
Set CS_TempPoint = (Center of (Playable map area))
Unit - Create 1 Dummy for (Owner of CS_Caster[CS_TempInteger]) at CS_TempPoint facing Default building facing degrees
Unit - Set the custom value of (Last created unit) to CS_TempInteger
Custom script: call RemoveLocation(udg_CS_TempPoint)
Unit Group - Add (Last created unit) to CS_Group
Unit - Pause CS_Target[CS_TempInteger]
Special Effect - Create a special effect attached to the origin of CS_Target[CS_TempInteger] using Abilities\Weapons\FrostWyrmMissile\FrostWyrmMissile.mdl
Special Effect - Destroy (Last created special effect)
Unit - Cause CS_Caster[CS_TempInteger] to damage CS_Target[CS_TempInteger], dealing CS_Damage[CS_TempInteger] damage of attack type Spells and damage type Cold
Else - Actions
[/trigger]



[trigger="CS Run"]

CS Run
Events
Time - Every 0.50 seconds of game time
Conditions
(Number of units in CS_Group) Greater than 0
Actions
Unit Group - Pick every unit in CS_Group and do (Actions)
Loop - Actions
Set CS_TempInteger = (Custom value of (Picked unit))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(CS_Target[CS_TempInteger] is dead) Equal to True
CS_CurrentTime[CS_TempInteger] Greater than or equal to CS_MaxTime[CS_TempInteger]
Then - Actions
Unit - Remove (Picked unit) from the game
Unit Group - Remove CS_Target[CS_TempInteger] from CS_Check
Unit - Unpause CS_Target[CS_TempInteger]
Animation - Change CS_Target[CS_TempInteger]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
Animation - Change CS_Target[CS_TempInteger]'s animation speed to 100.00% of its original speed
Animation - Change CS_Target[CS_TempInteger] turn speed to 0.50
Special Effect - Destroy CS_SFX[CS_TempInteger]
Else - Actions
Animation - Change CS_Target[CS_TempInteger]'s animation speed to 0.00% of its original speed
Animation - Change CS_Target[CS_TempInteger] turn speed to 0.00
Animation - Change CS_Target[CS_TempInteger]'s vertex coloring to (30.00%, 30.00%, 100.00%) with 0.00% transparency
Set CS_CurrentTime[CS_TempInteger] = (CS_CurrentTime[CS_TempInteger] + 0.50)
[/trigger]


Remember to give credits if you use it into your map. :)

Keywords:
ice, cold, snap, cold snap, target
Contents

Simple Spell - Cold Snap (Map)

Reviews
12th Dec 2015 IcemanBo: Too long as NeedsFix. Rejected. 03:34, 8th Aug 2012 Magtheridon96: Like I said for the first resource, you need to use a better form of indexing.

Moderator

M

Moderator

12th Dec 2015
IcemanBo: Too long as NeedsFix. Rejected.

03:34, 8th Aug 2012
Magtheridon96: Like I said for the first resource, you need to use a better form of indexing.
 
Level 11
Joined
Dec 3, 2011
Messages
366
Instead of use :
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • CS_CustomValue Less than or equal to 1000
    • Then - Actions
    • Set CS_CustomValue = (CS_CustomValue + 1)
    • Else - Actions
    • Set CS_CustomValue = 1
You can try : UNIT INDEXER
 
Top