| 09-01-2008, 12:47 AM | #1 | |||
I made this spell as a request for Tide-Arc Ephemera a long time ago, and I think it would be a good idea for me to post it up here as an example of how to make spells that work with 0.033 second repeating timers MUI and nearly lagless with GUI. Basically, I have a whole bunch of parallel arrays and some simple gamecache (CSCache) usage. Tooltip:
Here are the pertinent spell triggers: Configuration: Singularity Variable Set
![]() Conditions
![]() Actions
![]() ![]() -------- General Variables --------
![]() ![]() Set Singularity_TotalLevels = 4
![]() ![]() Set Singularity_TimerInterval = (0.33 / 10.00)
![]() ![]() Set Singularity_PullSpeed = 10.25
![]() ![]() Set Singularity_PushSpeed = 5.50
![]() ![]() Set Singularity_ChannelOrderString = earthquake
![]() ![]() Set Singularity_PullEffectPath = Abilities\Weapons\WingedSerpentMissile\WingedSerpentMissile.mdl
![]() ![]() Set Singularity_PullEffectAttach = chest
![]() ![]() Set Singularity_PushEffectPath = Abilities\Weapons\WingedSerpentMissile\WingedSerpentMissile.mdl
![]() ![]() Set Singularity_PushEffectAttach = chest
![]() ![]() -------- The X/Y values of a given safe spot on the map that units will be moved to in the CheckPathability function --------
![]() ![]() -------- Make sure this value is within the map boundaries... --------
![]() ![]() Set Singularity_SafeSpotX = -3000.00
![]() ![]() Set Singularity_SafeSpotY = 3000.00
![]() ![]() -------- HoldRadius is the radius of the center of the singularity; units will be confined within this range --------
![]() ![]() Set Singularity_HoldRadius = 25.00
![]() ![]() -------- The index refers to what level of the spell the variable is set for --------
![]() ![]() Set Singularity_PullRadius[1] = 200.00
![]() ![]() Set Singularity_PullRadius[2] = 300.00
![]() ![]() Set Singularity_PullRadius[3] = 400.00
![]() ![]() Set Singularity_PullRadius[4] = 500.00
![]() ![]() Set Singularity_PushRadius[1] = 100.00
![]() ![]() Set Singularity_PushRadius[2] = 150.00
![]() ![]() Set Singularity_PushRadius[3] = 200.00
![]() ![]() Set Singularity_PushRadius[4] = 250.00
![]() ![]() Set Singularity_PullDamage[1] = 150.00
![]() ![]() Set Singularity_PullDamage[2] = 150.00
![]() ![]() Set Singularity_PullDamage[3] = 150.00
![]() ![]() Set Singularity_PullDamage[4] = 150.00
![]() ![]() Set Singularity_PushDamage[1] = 50.00
![]() ![]() Set Singularity_PushDamage[2] = 50.00
![]() ![]() Set Singularity_PushDamage[3] = 50.00
![]() ![]() Set Singularity_PushDamage[4] = 50.00
![]() ![]() Set Singularity_PushDamageDistance[1] = 90.00
![]() ![]() Set Singularity_PushDamageDistance[2] = 90.00
![]() ![]() Set Singularity_PushDamageDistance[3] = 90.00
![]() ![]() Set Singularity_PushDamageDistance[4] = 90.00
![]() ![]() Set Singularity_PullAllies[1] = True
![]() ![]() Set Singularity_PullAllies[2] = True
![]() ![]() Set Singularity_PullAllies[3] = True
![]() ![]() Set Singularity_PullAllies[4] = True
![]() ![]() Set Singularity_PullEnemies[1] = True
![]() ![]() Set Singularity_PullEnemies[2] = True
![]() ![]() Set Singularity_PullEnemies[3] = True
![]() ![]() Set Singularity_PullEnemies[4] = True
![]() ![]() -------- Results may vary if PullSelf is set to true... --------
![]() ![]() Set Singularity_PullSelf[1] = False
![]() ![]() Set Singularity_PullSelf[2] = False
![]() ![]() Set Singularity_PullSelf[3] = False
![]() ![]() Set Singularity_PullSelf[4] = False
![]() ![]() Set Singularity_PushAllies[1] = True
![]() ![]() Set Singularity_PushAllies[2] = True
![]() ![]() Set Singularity_PushAllies[3] = True
![]() ![]() Set Singularity_PushAllies[4] = True
![]() ![]() Set Singularity_PushEnemies[1] = True
![]() ![]() Set Singularity_PushEnemies[2] = True
![]() ![]() Set Singularity_PushEnemies[3] = True
![]() ![]() Set Singularity_PushEnemies[4] = True
![]() ![]() -------- For the Knockback --------
![]() ![]() Set Singularity_KnockbackInterval = (0.33 / 10.00)
![]() ![]() Set Singularity_KnockbackSpeed = 18.00
![]() ![]() Set Singularity_KnockbackDistance[1] = 225.00
![]() ![]() Set Singularity_KnockbackDistance[2] = 225.00
![]() ![]() Set Singularity_KnockbackDistance[3] = 225.00
![]() ![]() Set Singularity_KnockbackDistance[4] = 225.00
![]() ![]() Set SingularityKB_EffectPath = Abilities\Weapons\WingedSerpentMissile\WingedSerpentMissile.mdl
![]() ![]() Set SingularityKB_EffectAttach = chest
![]() ![]() -------- -- --------
![]() ![]() Set Singularity_Duration[1] = 15.00
![]() ![]() Set Singularity_Duration[2] = 15.00
![]() ![]() Set Singularity_Duration[3] = 15.00
![]() ![]() Set Singularity_Duration[4] = 15.00
![]() ![]() Set Singularity_IsChanneling[1] = False
![]() ![]() Set Singularity_IsChanneling[2] = False
![]() ![]() Set Singularity_IsChanneling[3] = False
![]() ![]() Set Singularity_IsChanneling[4] = False
![]() ![]() -------- Don't Modify Past Here --------
![]() ![]() Trigger - Add to Singularity Periodic <gen> the event (Time - Every Singularity_TimerInterval seconds of game time)
![]() ![]() Trigger - Add to Singularity Knockback <gen> the event (Time - Every Singularity_KnockbackInterval seconds of game time)
![]() ![]() Set Singularity_HoldRadius = (Singularity_HoldRadius x Singularity_HoldRadius)
![]() ![]() Set Singularity_PullDamage[101] = (Min X of (Playable map area))
![]() ![]() Set Singularity_PullDamage[102] = (Max X of (Playable map area))
![]() ![]() Set Singularity_PullDamage[103] = (Min Y of (Playable map area))
![]() ![]() Set Singularity_PullDamage[104] = (Max Y of (Playable map area))
![]() ![]() Set Singularity_Point = (Point(Singularity_SafeSpotX, Singularity_SafeSpotY))
![]() ![]() Unit - Create 1 Singularity Pathing Unit for Neutral Passive at Singularity_Point facing Default building facing degrees
![]() ![]() Set Singularity_PathUnit = (Last created unit)
![]() ![]() Custom script: call RemoveLocation(udg_Singularity_Point)
![]() ![]() Custom script: set udg_Singularity_AffectedGroups[666] = CreateGroup()
![]() ![]() Custom script: set udg_Singularity_AffectedGroups[777] = CreateGroup()
![]() ![]() Custom script: call DestroyGroup(udg_Singularity_AffectedGroups[1])Cast: Singularity Cast
![]() Actions
![]() ![]() Set Singularity_MaxInstances = (Singularity_MaxInstances + 1)
![]() ![]() Set Singularity_Casters[Singularity_MaxInstances] = (Triggering unit)
![]() ![]() Set Singularity_Level[Singularity_MaxInstances] = (Level of Singularity for Singularity_Casters[Singularity_MaxInstances])
![]() ![]() Set Singularity_Players[Singularity_MaxInstances] = (Owner of Singularity_Casters[Singularity_MaxInstances])
![]() ![]() -------- - --------
![]() ![]() Set Singularity_Point = (Target point of ability being cast)
![]() ![]() Unit - Create 1 Singularity Dummy for Singularity_Players[Singularity_MaxInstances] at Singularity_Point facing Default building facing degrees
![]() ![]() Set Singularity_Dummies[Singularity_MaxInstances] = (Last created unit)
![]() ![]() Unit - Add a Singularity_Duration[Singularity_Level[Singularity_MaxInstances]] second Generic expiration timer to Singularity_Dummies[Singularity_MaxInstances]
![]() ![]() Unit - Add Singularity Buff to Singularity_Dummies[Singularity_MaxInstances]
![]() ![]() Unit - Set level of Singularity Buff for Singularity_Dummies[SingularityKB_MaxInstances] to Singularity_Level[SingularityKB_MaxInstances]
![]() ![]() Unit - Order Singularity_Dummies[Singularity_MaxInstances] to Undead Necromancer - Unholy Frenzy Singularity_Casters[Singularity_MaxInstances]
![]() ![]() Set Singularity_CenterX[Singularity_MaxInstances] = (X of Singularity_Point)
![]() ![]() Set Singularity_CenterY[Singularity_MaxInstances] = (Y of Singularity_Point)
![]() ![]() Custom script: call RemoveLocation(udg_Singularity_Point)
![]() ![]() Custom script: set udg_Singularity_AffectedGroups[udg_Singularity_MaxInstances] = CreateGroup()Periodic: Singularity Periodic
![]() Events
![]() Actions
![]() ![]() Custom script: local boolexpr B
![]() ![]() Custom script: local real Angle
![]() ![]() For each (Integer Singularity_CurrentInstance) from 1 to Singularity_MaxInstances, do (Actions)
![]() ![]() ![]() Loop - Actions
![]() ![]() ![]() ![]() If (All Conditions are True) then do (Then Actions) else do (Else Actions)
![]() ![]() ![]() ![]() ![]() Then - Actions
![]() ![]() ![]() ![]() ![]() ![]() If (All Conditions are True) then do (Then Actions) else do (Else Actions)
![]() ![]() ![]() ![]() ![]() ![]() ![]() If - Conditions
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() And - All (Conditions) are true
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Conditions
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() (Singularity_Dummies[Singularity_CurrentInstance] is alive) Equal to True
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Or - Any (Conditions) are true
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Conditions
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Singularity_IsChanneling[Singularity_Level[Singularity_CurrentInstance]] Equal to False
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() (Singularity_IsChanneling[Singularity_Level[Singularity_CurrentInstance]] Equal to True) and ((String((Current order of Singularity_Casters[Singularity_CurrentInstance]))) Equal to Singularity_ChannelOrderString)
![]() ![]() ![]() ![]() ![]() ![]() ![]() Then - Actions
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Custom script: set B = Condition(function Singularity_PullFilter)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Custom script: call GroupEnumUnitsInRange(udg_Singularity_Group, udg_Singularity_CenterX[udg_Singularity_CurrentInstance], udg_Singularity_CenterY[udg_Singularity_CurrentInstance], udg_Singularity_PullRadius[udg_Singularity_Level[udg_Singularity_CurrentInstance]], B)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Custom script: loop
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Custom script: set udg_Singularity_Unit = FirstOfGroup(udg_Singularity_Group)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Custom script: exitwhen udg_Singularity_Unit == null
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() -------- - --------
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Custom script: set udg_Singularity_X = GetUnitX(udg_Singularity_Unit)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Custom script: set udg_Singularity_Y = GetUnitY(udg_Singularity_Unit)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() If (All Conditions are True) then do (Then Actions) else do (Else Actions)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() If - Conditions
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() (((Singularity_X - Singularity_CenterX[Singularity_CurrentInstance]) x (Singularity_X - Singularity_CenterX[Singularity_CurrentInstance])) + ((Singularity_Y - Singularity_CenterY[Singularity_CurrentInstance]) x (Singularity_Y - Singularity_CenterY[Singularity Greater than Singularity_HoldRadius
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Then - Actions
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Custom script: set Angle = Atan2((udg_Singularity_CenterY[udg_Singularity_CurrentInstance]-udg_Singularity_Y), (udg_Singularity_CenterX[udg_Singularity_CurrentInstance]-udg_Singularity_X))
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Custom script: call SetUnitX(udg_Singularity_Unit, udg_Singularity_X+udg_Singularity_PullSpeed*Cos(Angle))
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Custom script: call SetUnitY(udg_Singularity_Unit, udg_Singularity_Y+udg_Singularity_PullSpeed*Sin(Angle))
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Custom script: call DestroyEffect(AddSpecialEffectTarget(udg_Singularity_PullEffectPath, udg_Singularity_Unit, udg_Singularity_PullEffectAttach))
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Else - Actions
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() If (All Conditions are True) then do (Then Actions) else do (Else Actions)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() If - Conditions
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() (Singularity_Unit is in Singularity_AffectedGroups[Singularity_CurrentInstance]) Equal to False
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() (Singularity_Unit is in Singularity_AffectedGroups[666]) Equal to False
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Then - Actions
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Unit Group - Add Singularity_Unit to Singularity_AffectedGroups[666]
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Unit Group - Add Singularity_Unit to Singularity_AffectedGroups[Singularity_CurrentInstance]
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Unit - Turn collision for Singularity_Unit Off
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Unit - Set Singularity_Unit movement speed to 1.00
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Unit - Cause Singularity_Casters[Singularity_CurrentInstance] to damage Singularity_Unit, dealing Singularity_PullDamage[Singularity_Level[Singularity_CurrentInstance]] damage of attack type Spells and damage type Normal
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Else - Actions
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() -------- - --------
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Unit Group - Remove Singularity_Unit from Singularity_Group
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Custom script: endloop
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() -------- - --------
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Custom script: set B = Condition(function Singularity_PullRemoveFilter)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Custom script: call GroupEnumUnitsInRect(udg_Singularity_Group, bj_mapInitialPlayableArea, B)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Custom script: loop
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Custom script: set udg_Singularity_Unit = FirstOfGroup(udg_Singularity_Group)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Custom script: exitwhen udg_Singularity_Unit == null
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() -------- - --------
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Custom script: set udg_Singularity_X = GetUnitX(udg_Singularity_Unit)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Custom script: set udg_Singularity_Y = GetUnitY(udg_Singularity_Unit)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Set Singularity_PullRadius[666] = (Singularity_X - Singularity_CenterX[Singularity_CurrentInstance])
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Set Singularity_PullRadius[777] = (Singularity_Y - Singularity_CenterY[Singularity_CurrentInstance])
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() If (All Conditions are True) then do (Then Actions) else do (Else Actions)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() If - Conditions
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ((Singularity_PullRadius[666] x Singularity_PullRadius[666]) + (Singularity_PullRadius[777] x Singularity_PullRadius[777])) Greater than Singularity_PullRadius_Mult[Singularity_Level[Singularity_CurrentInstance]]
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Then - Actions
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Unit - Turn collision for Singularity_Unit On
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Unit - Set Singularity_Unit movement speed to (Default movement speed of Singularity_Unit)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Unit Group - Remove Singularity_Unit from Singularity_AffectedGroups[666]
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Unit Group - Remove Singularity_Unit from Singularity_AffectedGroups[Singularity_CurrentInstance]
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Else - Actions
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Unit Group - Remove Singularity_Unit from Singularity_Group
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Custom script: endloop
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() -------- - --------
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Custom script: set B = Condition(function Singularity_PushFilter)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Custom script: set udg_Singularity_CasterX = GetUnitX(udg_Singularity_Casters[udg_Singularity_CurrentInstance])
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Custom script: set udg_Singularity_CasterY = GetUnitY(udg_Singularity_Casters[udg_Singularity_CurrentInstance])
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Custom script: call GroupEnumUnitsInRange(udg_Singularity_Group, udg_Singularity_CasterX, udg_Singularity_CasterY, udg_Singularity_PushRadius[udg_Singularity_Level[udg_Singularity_CurrentInstance]], B)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Custom script: loop
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Custom script: set udg_Singularity_Unit = FirstOfGroup(udg_Singularity_Group)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Custom script: exitwhen udg_Singularity_Unit == null
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() -------- - --------
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Custom script: set udg_Singularity_X = GetUnitX(udg_Singularity_Unit)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Custom script: set udg_Singularity_Y = GetUnitY(udg_Singularity_Unit)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Custom script: set Angle = Atan2((udg_Singularity_Y-udg_Singularity_CasterY), (udg_Singularity_X-udg_Singularity_CasterX))
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() If (All Conditions are True) then do (Then Actions) else do (Else Actions)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() If - Conditions
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() (((Singularity_X - Singularity_CasterX) x (Singularity_X - Singularity_CasterX)) + ((Singularity_Y - Singularity_CasterY) x (Singularity_Y - Singularity_CasterY))) Less than or equal to Singularity_PushDamageDistance[Singularity_Level[Singularity_CurrentInstance]]
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Then - Actions
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Unit - Cause Singularity_Casters[Singularity_CurrentInstance] to damage Singularity_Unit, dealing Singularity_PushDamage[Singularity_Level[Singularity_CurrentInstance]] damage of attack type Spells and damage type Normal
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Unit - Pause Singularity_Unit
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Unit Group - Add Singularity_Unit to Singularity_AffectedGroups[777]
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Set SingularityKB_MaxInstances = (SingularityKB_MaxInstances + 1)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Set SingularityKB_Units[SingularityKB_MaxInstances] = Singularity_Unit
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Custom script: set udg_SingularityKB_Cos[udg_SingularityKB_MaxInstances] = Cos(Angle)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Custom script: set udg_SingularityKB_Sin[udg_SingularityKB_MaxInstances] = Sin(Angle)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Set SingularityKB_IterationsLeft[SingularityKB_MaxInstances] = (Integer((Singularity_KnockbackDistance[Singularity_Level[Singularity_CurrentInstance]] / Singularity_KnockbackSpeed)))
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Else - Actions
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Custom script: set udg_Singularity_X = udg_Singularity_X+udg_Singularity_PushSpeed*Cos(Angle)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Custom script: set udg_Singularity_Y = udg_Singularity_Y+udg_Singularity_PushSpeed*Sin(Angle)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Custom script: if Singularity_CheckPathability(udg_Singularity_Unit, udg_Singularity_X, udg_Singularity_Y) then
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Custom script: call SetUnitX(udg_Singularity_Unit, udg_Singularity_X)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Custom script: call SetUnitY(udg_Singularity_Unit, udg_Singularity_Y)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Custom script: endif
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Custom script: call DestroyEffect(AddSpecialEffectTarget(udg_Singularity_PushEffectPath, udg_Singularity_Unit, udg_Singularity_PushEffectAttach))
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() -------- - --------
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Unit Group - Remove Singularity_Unit from Singularity_Group
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Custom script: endloop
![]() ![]() ![]() ![]() ![]() ![]() ![]() Else - Actions
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Unit Group - Pick every unit in Singularity_AffectedGroups[Singularity_CurrentInstance] and do (Actions)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Loop - Actions
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Set Singularity_Unit = (Picked unit)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Unit - Turn collision for Singularity_Unit On
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Unit - Set Singularity_Unit movement speed to (Default movement speed of Singularity_Unit)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Unit Group - Remove Singularity_Unit from Singularity_AffectedGroups[666]
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Custom script: call SetUnitPosition(udg_Singularity_Unit, GetUnitX(udg_Singularity_Unit), GetUnitY(udg_Singularity_Unit))
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Custom script: call DestroyGroup(udg_Singularity_AffectedGroups[udg_Singularity_CurrentInstance])
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() -------- - --------
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() If (All Conditions are True) then do (Then Actions) else do (Else Actions)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() If - Conditions
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Singularity_MaxInstances Greater than 1
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Singularity_CurrentInstance Less than Singularity_MaxInstances
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Then - Actions
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Set Singularity_AffectedGroups[Singularity_CurrentInstance] = Singularity_AffectedGroups[Singularity_MaxInstances]
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Set Singularity_Casters[Singularity_CurrentInstance] = Singularity_Casters[Singularity_MaxInstances]
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Set Singularity_CenterX[Singularity_CurrentInstance] = Singularity_CenterX[Singularity_MaxInstances]
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Set Singularity_CenterY[Singularity_CurrentInstance] = Singularity_CenterY[Singularity_MaxInstances]
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Set Singularity_Dummies[Singularity_CurrentInstance] = Singularity_Dummies[Singularity_MaxInstances]
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Set Singularity_Level[Singularity_CurrentInstance] = Singularity_Level[Singularity_MaxInstances]
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Set Singularity_Players[Singularity_CurrentInstance] = Singularity_Players[Singularity_MaxInstances]
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Else - Actions
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Custom script: set udg_Singularity_AffectedGroups[udg_Singularity_MaxInstances] = null
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Set Singularity_Casters[Singularity_MaxInstances] = No unit
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Set Singularity_Dummies[Singularity_MaxInstances] = No unit
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Custom script: set udg_Singularity_Players[udg_Singularity_MaxInstances] = null
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Set Singularity_CurrentInstance = (Singularity_CurrentInstance - 1)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Set Singularity_MaxInstances = (Singularity_MaxInstances - 1)
Knockback: Singularity Knockback
![]() Events
![]() Actions
![]() ![]() For each (Integer Singularity_CurrentInstance) from 1 to SingularityKB_MaxInstances, do (Actions)
![]() ![]() ![]() Loop - Actions
![]() ![]() ![]() ![]() Set SingularityKB_IterationsLeft[Singularity_CurrentInstance] = (SingularityKB_IterationsLeft[Singularity_CurrentInstance] - 1)
![]() ![]() ![]() ![]() If (All Conditions are True) then do (Then Actions) else do (Else Actions)
![]() ![]() ![]() ![]() ![]() If - Conditions
![]() ![]() ![]() ![]() ![]() ![]() SingularityKB_IterationsLeft[Singularity_CurrentInstance] Greater than 0
![]() ![]() ![]() ![]() ![]() ![]() (SingularityKB_Units[Singularity_CurrentInstance] is alive) Equal to True
![]() ![]() ![]() ![]() ![]() Then - Actions
![]() ![]() ![]() ![]() ![]() ![]() Custom script: set udg_Singularity_X = GetUnitX(udg_SingularityKB_Units[udg_Singularity_CurrentInstance])+udg_Singularity_KnockbackSpeed*udg_SingularityKB_Cos[udg_Singularity_CurrentInstance]
![]() ![]() ![]() ![]() ![]() ![]() Custom script: set udg_Singularity_Y = GetUnitY(udg_SingularityKB_Units[udg_Singularity_CurrentInstance])+udg_Singularity_KnockbackSpeed*udg_SingularityKB_Sin[udg_Singularity_CurrentInstance]
![]() ![]() ![]() ![]() ![]() ![]() Custom script: call SetUnitPosition(udg_SingularityKB_Units[udg_Singularity_CurrentInstance], udg_Singularity_X, udg_Singularity_Y)
![]() ![]() ![]() ![]() ![]() ![]() Custom script: call DestroyEffect(AddSpecialEffectTarget(udg_SingularityKB_EffectPath, udg_SingularityKB_Units[udg_Singularity_CurrentInstance], udg_SingularityKB_EffectAttach))
![]() ![]() ![]() ![]() ![]() Else - Actions
![]() ![]() ![]() ![]() ![]() ![]() Unit - Unpause SingularityKB_Units[Singularity_CurrentInstance]
![]() ![]() ![]() ![]() ![]() ![]() Unit Group - Remove SingularityKB_Units[Singularity_CurrentInstance] from Singularity_AffectedGroups[777]
![]() ![]() ![]() ![]() ![]() ![]() If (All Conditions are True) then do (Then Actions) else do (Else Actions)
![]() ![]() ![]() ![]() ![]() ![]() ![]() Then - Actions
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Set SingularityKB_Units[Singularity_CurrentInstance] = SingularityKB_Units[SingularityKB_MaxInstances]
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Set SingularityKB_Cos[Singularity_CurrentInstance] = SingularityKB_Cos[SingularityKB_MaxInstances]
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Set SingularityKB_Sin[Singularity_CurrentInstance] = SingularityKB_Sin[Singularity_MaxInstances]
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Set SingularityKB_IterationsLeft[Singularity_CurrentInstance] = SingularityKB_MaxInstances
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Set Singularity_CurrentInstance = (Singularity_CurrentInstance - 1)
![]() ![]() ![]() ![]() ![]() ![]() ![]() Else - Actions
![]() ![]() ![]() ![]() ![]() ![]() Set SingularityKB_Units[SingularityKB_MaxInstances] = No unit
![]() ![]() ![]() ![]() ![]() ![]() Set SingularityKB_MaxInstances = (SingularityKB_MaxInstances - 1) How to Import/Implement:Notes/How to implement: ****Spell-Specific Notes**** - SAVE YOUR MAP FIRST! - Import the BlackHole.mdx model if you choose to use that model as the singularity. - Copy over the 2 dummy units, 2 abilities, and 1 buff. - Copy over the 4 triggers under "Singularity" in order to create the required variables. - Copy everything in the Custom Script section into your map's header/custom script section or download and implement the newest CSCache version. - Configure everything. - I made this spell as non-laggy as possible, but please try not to cast it more than twice in the same general area. - Tell me if anything is wrong with the spell and I'll advise you on how to fix it or do it myself. - And yes, I know, there are a shitload of variables. Get over it; you wanted an MUI GUI spell running on a 0.33 second periodic timer with minimal lag. - This spell uses grim001's CheckPathability function in the pushing effects. Thanks to him. As for the black hole model, WILL THE ALLMIGHTY made it specifically for this request, so I think it's okay to post it up here. |
| 09-02-2008, 04:02 AM | #2 |
Ah, nice to see an advanced Jass'er go out and submit something to help GUI users with an "impossible GUI spell." I remember this spell from once upon an aeon, though. Anyway, as I said earlier, nice to see an advanced coder help the GUI mob. |
| 09-02-2008, 04:13 AM | #3 |
If you happen to still be using this spell, Tide, I updated it a bit to include a buff on the hero, which the original version didn't have. That and I fixed some tooltips 'n shtuff. |
| 09-02-2008, 04:20 AM | #4 |
Hm, will update my template then for my future uses. By the way, with your "How to implement" thingo, it says 0.33... y'do mean 0.033 right? |
| 09-03-2008, 07:17 AM | #5 |
Yeah. That's what I meant. |
| 09-18-2008, 09:11 PM | #6 | |
Quote:
|
| 09-18-2008, 09:14 PM | #7 |
This is the best pseudo GUI I've ever seen. It's mainly setting variables and calling custom script, with the occaisonal GUI function. Funky. |
| 09-18-2008, 10:00 PM | #8 |
Could you please attach a map? And put the documentation in a trigger comment, or at least replace that rtf with a text file, considering that the instructions don't have any formatting whatsoever? Just saying this because OS/X zip stuff is incredibly broken, that zip file is full of giberish and it is worthless anyway, wc3 maps are already compressed. |
| 09-19-2008, 12:22 AM | #9 |
The documentation is in a trigger, but the reason I posted a text file was because the text of JASS triggers created in OS X goes all wonky when opened with the Windows World Editor. Fixed. And yeah, it really is more Pseudo-GUI. However, the only reason for most of the Custom Script stuff is because you can't nest ForGroup calls and have GetEnumUnit() return the proper unit and because I needed to use SetUnitX/Y. |
| 09-19-2008, 01:03 AM | #10 |
I think it is a WE bug, blizz knowing their stuff is cross platform should have handled those line breaks. If you had an intel mac, you could run warcity, export, import, and triggers are fixed for windows, well, you may ask somebody to do that for you. Should try making a wct fixer for Java, you would have to do the mpq extracting though. |
| 09-19-2008, 01:07 AM | #11 |
If you can make it work, I can extract manually; I don't mind. And it is a WE bug, specifically related to Leopard. There are a LOT of Leopard WE bugs that make no sense. |
| 09-24-2008, 10:12 AM | #12 |
LoL you made a Black Hole spell. |
| 09-24-2008, 10:14 AM | #13 |
You're not a hardcore Jass'er unless you make blackholes, but you're an uber mega 1337 haxxor god if you can GUI/"pseudo-GUI" (which we obviously all know is bullshit, GUI can do EVERYTHING) them!1!11 |
| 09-24-2008, 10:56 PM | #14 |
It's not entirely just a black hole spell. |
| 09-24-2008, 11:27 PM | #15 |
nice for the gui people. Sadly it is a GUI-wannabe spell, not really gui XD Cus all in all Gui is jass, so gui can never overcome jass. Just like u can do many things with a car, but with car parts u can do more things if u know how to handle them ^^ |
