- Joined
- Mar 1, 2013
- Messages
- 555
Hey people
I made a GUI version of chain frost a long time ago and spent many hours trying to make it perfect but it never wants to work flawless
Sometimes the spell will hit the same unit 33 times per sec when no other targets is around and often go to centre. The effect never gets removed.
I would appreciate it if someone can help me fix this
I made a GUI version of chain frost a long time ago and spent many hours trying to make it perfect but it never wants to work flawless
Sometimes the spell will hit the same unit 33 times per sec when no other targets is around and often go to centre. The effect never gets removed.
-
Chain frost spell
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Chain frost
-
Actions
- If (iChainFrostIndex Equal to 0) then do (Trigger - Turn on Chain frost loop <gen>) else do (Do nothing)
- Set iChainFrostIndex = (iChainFrostIndex + 1)
- Set uChainFrostC[iChainFrostIndex] = (Triggering unit)
- Set uChainFrostT[iChainFrostIndex] = (Target unit of ability being cast)
- Set Temp_Point = (Position of uChainFrostC[iChainFrostIndex])
- Unit - Create 1 Chain frost for (Owner of uChainFrostC[iChainFrostIndex]) at Temp_Point facing Default building facing degrees
- Custom script: call RemoveLocation(udg_Temp_Point)
- Set uChainFrostE[iChainFrostIndex] = (Last created unit)
- Set iChainFrostJumps[iChainFrostIndex] = 7
-
Events
-
Chain frost loop
-
Events
- Time - Every 0.03 seconds of game time
- Conditions
-
Actions
-
For each (Integer Temp_Int) from 1 to iChainFrostIndex, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (uChainFrostE[Temp_Int] is paused) Equal to False
-
Then - Actions
- Set Temp_Point = (Position of uChainFrostE[Temp_Int])
- Set Temp_Point2 = (Position of uChainFrostT[Temp_Int])
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Distance between Temp_Point and Temp_Point2) Greater than 20.00
-
Then - Actions
- Set Temp_Point3 = (Temp_Point offset by 8.00 towards (Angle from Temp_Point to Temp_Point2) degrees)
- Unit - Move uChainFrostE[Temp_Int] instantly to Temp_Point3
- Custom script: call RemoveLocation(udg_Temp_Point3)
-
Else - Actions
- Unit - Move uChainFrostE[Temp_Int] instantly to Temp_Point2
- Unit - Cause uChainFrostC[Temp_Int] to damage uChainFrostT[Temp_Int], dealing 250.00 damage of attack type Spells and damage type Normal
- Special Effect - Create a special effect at Temp_Point2 using Abilities\Spells\Undead\FrostNova\FrostNovaTarget.mdl
- Special Effect - Destroy (Last created special effect)
- Set iChainFrostJumps[Temp_Int] = (iChainFrostJumps[Temp_Int] - 1)
- Set Temp_Group = (Units within 500.00 of Temp_Point2 matching (((Owner of (Matching unit)) is an enemy of (Owner of uChainFrostC[Temp_Int])) Equal to True))
- Custom script: call RemoveLocation(udg_Temp_Point2)
-
Unit Group - Pick every unit in Temp_Group and do (Actions)
-
Loop - Actions
- Set Temp_Unit = (Picked unit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
- Temp_Unit Equal to uChainFrostT[Temp_Int]
- (Temp_Unit is A structure) Equal to True
- (Temp_Unit is dead) Equal to True
-
Conditions
-
Or - Any (Conditions) are true
-
Then - Actions
- Unit Group - Remove Temp_Unit from Temp_Group
- Else - Actions
-
If - Conditions
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
- iChainFrostJumps[Temp_Int] Greater than 0
- (Temp_Group is empty) Equal to False
-
Conditions
-
Or - Any (Conditions) are true
-
Then - Actions
- Set uChainFrostT[Temp_Int] = (Random unit from Temp_Group)
-
Else - Actions
- Unit - Remove uChainFrostE[Temp_Int] from the game
- Set uChainFrostE[Temp_Int] = uChainFrostE[iChainFrostIndex]
- Set uChainFrostE[iChainFrostIndex] = No unit
- Set uChainFrostC[Temp_Int] = uChainFrostC[iChainFrostIndex]
- Set uChainFrostC[iChainFrostIndex] = No unit
- Set uChainFrostT[Temp_Int] = uChainFrostT[iChainFrostIndex]
- Set uChainFrostT[iChainFrostIndex] = No unit
- Set iChainFrostJumps[Temp_Int] = iChainFrostJumps[iChainFrostIndex]
- Set iChainFrostJumps[iChainFrostIndex] = 0
- Set iChainFrostIndex = (iChainFrostIndex - 1)
- Set Temp_Int = (Temp_Int - 1)
- If (iChainFrostIndex Equal to 0) then do (Trigger - Turn off (This trigger)) else do (-------- 0 --------)
-
If - Conditions
- Custom script: call DestroyGroup(udg_Temp_Group)
-
If - Conditions
- Custom script: call RemoveLocation(udg_Temp_Point)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
For each (Integer Temp_Int) from 1 to iChainFrostIndex, do (Actions)
-
Events
I would appreciate it if someone can help me fix this