- Joined
- Apr 23, 2010
- Messages
- 312
It's been a long time since I've tried creating any spells and even looking at an older one I made I can't tell what I'm doing wrong that makes this not MUI. I've attached a map with my spell on it, what's not working is it doesn't un-pause some units when it should be.
Please note that I am using Bribes Unit Indexer and Knockback2D for this spell.
Please note that I am using Bribes Unit Indexer and Knockback2D for this spell.
-
Cast
-

Events
-


Unit - A unit Starts the effect of an ability
-
-

Conditions
-


(Ability being cast) Equal to Crowd
-
-

Actions
-


Set S_Index = (Custom value of (Triggering unit))
-


Set S_Caster[S_Index] = (Triggering unit)
-


Set S_Target[S_Index] = (Target unit of ability being cast)
-


Set S_TempPoint = (Position of S_Target[S_Index])
-


Set S_GroupAmount = 0
-


Custom script: set bj_wantDestroyGroup = true
-


Unit Group - Pick every unit in (Units within 900.00 of S_TempPoint matching (((((Matching unit) is A structure) Equal to False) and (((Matching unit) is Able to attack ground units) Equal to True)) and ((((Matching unit) is A peon-type unit) Equal to False) and ((((Matching unit) is alive) and do (Actions)
-



Loop - Actions
-




Set S_TempUnit = (Picked unit)
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






(Owner of S_TempUnit) Equal to (Owner of S_Caster[S_Index])
-
-





Then - Actions
-






Set S_GroupAmount = (S_GroupAmount + 1)
-






Unit - Order (Picked unit) to Attack S_Target[S_Index]
-
-





Else - Actions
-






If (S_TempUnit Not equal to S_Target[S_Index]) then do (Unit Group - Add S_TempUnit to S_PausedGroup[S_Index]) else do (Do nothing)
-
-
-
-
-


Trigger - Turn on Effect Loop <gen>
-


Set S_Damage = (((Real(S_GroupAmount)) + (Real((Intelligence of S_Caster[S_Index] (Include bonuses))))) + ((Real((Level of Crowd for S_Caster[S_Index]))) x (Real((Level of S_Caster[S_Index])))))
-


Unit - Cause S_Caster[S_Index] to damage S_Target[S_Index], dealing S_Damage damage of attack type Spells and damage type Normal
-


Set S_DamageString = (Integer(S_Damage))
-


Special Effect - Create a special effect attached to the origin of S_Target[S_Index] using Abilities\Spells\Undead\DeathPact\DeathPactTarget.mdl
-


Special Effect - Destroy (Last created special effect)
-


Floating Text - Create floating text that reads (String(S_DamageString)) above S_Target[S_Index] with Z offset 10.00, using font size 9.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
-


Floating Text - Set the velocity of (Last created floating text) to 50.00 towards 90.00 degrees
-


Floating Text - Change (Last created floating text): Disable permanence
-


Floating Text - Change the lifespan of (Last created floating text) to 3.25 seconds
-


Floating Text - Change the fading age of (Last created floating text) to 0.75 seconds
-


Floating Text - Show (Last created floating text) for (All players)
-


Custom script: call RemoveLocation(udg_S_TempPoint)
-
-
-
Effect Loop
-

Events
-


Time - Every 0.03 seconds of game time
-
-

Conditions
-

Actions
-


Set S_LoopTime[S_Index] = (S_LoopTime[S_Index] + 0.03)
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




S_LoopTime[S_Index] Less than 3.00
-
-



Then - Actions
-




Unit Group - Pick every unit in S_PausedGroup[S_Index] and do (Actions)
-





Loop - Actions
-






Set S_TempLoopUnit[S_Index] = (Picked unit)
-






Set S_TempKey = (Custom value of S_TempLoopUnit[S_Index])
-






Special Effect - Destroy S_Effect[S_TempKey]
-






If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-







If - Conditions
-








(S_TempLoopUnit[S_Index] is paused) Equal to False
-
-







Then - Actions
-








Unit - Pause S_TempLoopUnit[S_Index]
-








Special Effect - Create a special effect attached to the overhead of S_TempLoopUnit[S_Index] using Abilities\Spells\Human\Thunderclap\ThunderclapTarget.mdl
-








Set S_Effect[S_TempKey] = (Last created special effect)
-








Set CenterPoint = (Position of S_Caster[S_Index])
-








Set TargetPoint = (Position of S_Target[S_Index])
-








Set Knockback2DAngle = (Angle from CenterPoint to TargetPoint)
-








Custom script: call RemoveLocation(udg_CenterPoint)
-








Custom script: call RemoveLocation(udg_TargetPoint)
-








Set Knockback2DTime = 1.25
-








Set Knockback2DDistance = ((Real((Level of Crowd for S_Caster[S_Index]))) x 75.00)
-








Trigger - Run Knockback 2D <gen> (ignoring conditions)
-








Set Knockback2DUnit = S_TempLoopUnit[S_Index]
-
-







Else - Actions
-
-
-
-
-



Else - Actions
-




Set S_LoopTime[S_Index] = 0.00
-




Unit Group - Pick every unit in S_PausedGroup[S_Index] and do (Actions)
-





Loop - Actions
-






Set S_TempLoopUnit[S_Index] = (Picked unit)
-






Set S_TempKey = (Custom value of S_TempLoopUnit[S_Index])
-






Special Effect - Destroy S_Effect[S_TempKey]
-






Unit - Unpause S_TempLoopUnit[S_Index]
-






Unit Group - Remove S_TempLoopUnit[S_Index] from S_PausedGroup[S_Index]
-
-
-
-
-
-

