My map always has some nasty heavy fps lag when it play like 10 minute.
Here is all the looping triggers in my mini map.
Here is all the looping triggers in my mini map.
-
Shoot Start
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to (==) Shoot
-
Actions
- Set Point[1] = (Position of (Triggering unit))
- Set Point[3] = (Target point of ability being cast)
- Set Point[2] = (Point[1] offset by 50.00 towards (Angle from Point[1] to Point[3]) degrees)
- Unit - Create 1 Dummy for (Owner of (Triggering unit)) at Point[2] facing (Angle from Point[1] to Point[3]) degrees
- Unit - Set the custom value of (Last created unit) to 5
- Custom script: call RemoveLocation(udg_Point[1])
- Custom script: call RemoveLocation(udg_Point[2])
- Custom script: call RemoveLocation(udg_Point[3])
- Unit Group - Add (Last created unit) to Dummy_Group
- Trigger - Turn on Shoot Loop <gen>
- Set zzLoc1 = (Position of (Last created unit))
- Set zzLoc2 = (Position of (Triggering unit))
- Set zzReal = (Angle from zzLoc1 to zzLoc2)
- Set zzReal2 = 15.00
- Set zzUnit = (Triggering unit)
- Set zzInteger2 = 15
- Custom script: call RemoveLocation(udg_zzLoc1)
- Custom script: call RemoveLocation(udg_zzLoc2)
- Trigger - Run KnockBackAdd <gen> (checking conditions)
-
Events
-
Shoot Loop
-
Events
- Time - Every 0.03 seconds of game time
- Conditions
-
Actions
-
Unit Group - Pick every unit in Dummy_Group and do (Actions)
-
Loop - Actions
- Set Point[3] = (Position of (Picked unit))
-
Set Point[4] = (Point[3] offset by 30.00 towards (Facing of (Picked unit)) degrees)
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Terrain pathing at Point[4] of type Walkability is off) Equal to (==) False
-
Then - Actions
- Unit - Move (Picked unit) instantly to Point[4]
-
Else - Actions
- Unit Group - Remove (Picked unit) from Dummy_Group
- Unit - Remove (Picked unit) from the game
- Special Effect - Create a special effect at Point[4] using Abilities\Spells\Items\StaffOfPurification\PurificationCaster.mdl
- Special Effect - Destroy (Last created special effect)
- Cinematic - Ping minimap for (All allies of (Owner of TempUnit)) at Point[4] for 3.00 seconds
-
If - Conditions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Custom script: call RemoveLocation(udg_Point[3])
- Set TempUnit = (Picked unit)
- Set TempGroup = (Units within 90.00 of Point[4] matching ((((Matching unit) is alive) Equal to (==) True) and ((Unit-type of (Matching unit)) Not equal to (!=) Dummy)))
-
Unit Group - Pick every unit in TempGroup and do (Actions)
-
Loop - Actions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Number of units in TempGroup) Greater than (>) 0
-
Then - Actions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Unit-type of (Picked unit)) Equal to (==) Marine
- (TempUnit belongs to an enemy of (Owner of (Picked unit))) Equal to (==) True
-
Then - Actions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (TempUnit belongs to an enemy of (Owner of (Picked unit))) Equal to (==) True
-
Then - Actions
- Unit - Cause TempUnit to damage (Picked unit), dealing 9999.00 damage of attack type Normal and damage type Normal
- Unit - Make (Picked unit) face Point[4] over 0.00 seconds
- Set zzLoc1 = (Position of TempUnit)
- Set zzLoc2 = (Position of (Picked unit))
- Set zzReal = (Angle from zzLoc1 to zzLoc2)
- Set zzReal2 = 20.00
- Set zzUnit = (Picked unit)
- Set zzInteger2 = 10
- Custom script: call RemoveLocation(udg_zzLoc1)
- Custom script: call RemoveLocation(udg_zzLoc2)
- Trigger - Run KnockBackAdd <gen> (checking conditions)
- Unit Group - Remove TempUnit from Dummy_Group
- Unit - Remove TempUnit from the game
- Special Effect - Create a special effect at Point[4] using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl
- Special Effect - Destroy (Last created special effect)
- Cinematic - Ping minimap for (All allies of (Owner of TempUnit)) at Point[4] for 3.00 seconds
-
Else - Actions
- Unit - Make (Picked unit) face Point[4] over 0.00 seconds
- Set zzLoc1 = (Position of TempUnit)
- Set zzLoc2 = (Position of (Picked unit))
- Set zzReal = (Angle from zzLoc1 to zzLoc2)
- Set zzReal2 = 20.00
- Set zzUnit = (Picked unit)
- Set zzInteger2 = 20
- Custom script: call RemoveLocation(udg_zzLoc1)
- Custom script: call RemoveLocation(udg_zzLoc2)
- Trigger - Run KnockBackAdd <gen> (checking conditions)
- Unit Group - Remove TempUnit from Dummy_Group
- Unit - Remove TempUnit from the game
- Special Effect - Create a special effect at Point[4] using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl
- Special Effect - Destroy (Last created special effect)
- Cinematic - Ping minimap for (All allies of (Owner of TempUnit)) at Point[4] for 3.00 seconds
-
If - Conditions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Else - Actions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Unit-type of (Picked unit)) Equal to (==) Dummy
-
Then - Actions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Custom value of TempUnit) Greater than (>) 1
-
Then - Actions
- Unit - Make TempUnit face ((Facing of TempUnit) - 160.00) over 0.00 seconds
-
Else - Actions
- Unit Group - Remove TempUnit from Dummy_Group
- Unit - Remove TempUnit from the game
- Special Effect - Create a special effect at Point[4] using Objects\Spawnmodels\Human\FragmentationShards\FragBoomSpawn.mdl
- Special Effect - Destroy (Last created special effect)
-
If - Conditions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Custom value of (Picked unit)) Greater than (>) 1
-
Then - Actions
- Unit - Make (Picked unit) face ((Facing of (Picked unit)) + 160.00) over 0.00 seconds
-
Else - Actions
- Unit Group - Remove (Picked unit) from Dummy_Group
- Unit - Remove (Picked unit) from the game
- Set Point[5] = (Position of (Picked unit))
- Special Effect - Create a special effect at Point[5] using Objects\Spawnmodels\Human\FragmentationShards\FragBoomSpawn.mdl
- Custom script: call RemoveLocation(udg_Point[5])
- Special Effect - Destroy (Last created special effect)
-
If - Conditions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Else - Actions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Unit-type of (Picked unit)) Equal to (==) Crate
-
Then - Actions
-
Set Tempinteger2 = (Random integer number between 1 and 3)
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Tempinteger2 Equal to (==) 1
-
Then - Actions
- Unit - Make TempUnit face ((Facing of TempUnit) + 360.00) over 0.00 seconds
-
Else - Actions
- Unit Group - Remove TempUnit from Dummy_Group
- Unit - Remove TempUnit from the game
- Special Effect - Create a special effect at Point[4] using Objects\Spawnmodels\Human\HCancelDeath\HCancelDeath.mdl
- Special Effect - Destroy (Last created special effect)
-
If - Conditions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Set Tempinteger2 = (Random integer number between 1 and 3)
-
Else - Actions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Unit-type of (Picked unit)) Equal to (==) Cliff
-
Then - Actions
- Unit Group - Remove TempUnit from Dummy_Group
- Unit - Remove TempUnit from the game
- Special Effect - Create a special effect at Point[4] using Objects\Spawnmodels\Undead\ImpaleTargetDust\ImpaleTargetDust.mdl
- Special Effect - Destroy (Last created special effect)
- Cinematic - Ping minimap for (All allies of (Owner of TempUnit)) at Point[4] for 3.00 seconds
- Else - Actions
-
If - Conditions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
-
If - Conditions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
- Unit Group - Destroy unit group TempGroup
- Custom script: call RemoveLocation(udg_Point[4])
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Number of units in Dummy_Group) Less than (<) 1
-
Then - Actions
- Trigger - Turn off (This trigger)
- Else - Actions
-
If - Conditions
-
Loop - Actions
-
Unit Group - Pick every unit in Dummy_Group and do (Actions)
-
Events
-
Combat Rush
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to (==) Combat Rush
-
Actions
- Unit Group - Add (Triggering unit) to Rushing_Group
- Set Rushing_Range[(Player number of (Owner of (Triggering unit)))] = 0.00
- Set Rushing_Angle[(Player number of (Owner of (Triggering unit)))] = (Facing of (Triggering unit))
- Trigger - Turn on Combat Rushing <gen>
-
Events
-
Combat Rushing
-
Events
- Time - Every 0.05 seconds of game time
- Conditions
-
Actions
-
Unit Group - Pick every unit in Rushing_Group and do (Actions)
-
Loop - Actions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Picked unit) is alive) Equal to (==) True
-
Then - Actions
- Set Point[8] = (Position of (Picked unit))
- Set Point[9] = (Point[8] offset by 40.00 towards Rushing_Angle[(Player number of (Owner of (Picked unit)))] degrees)
-
Set TempGroup = (Units within 100.00 of Point[9] matching ((((Matching unit) Not equal to (!=) (Picked unit)) and (((Matching unit) is alive) Equal to (==) True)) and ((Unit-type of (Matching unit)) Not equal to (!=) Dummy)))
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Multiple ConditionsOr - Any (Conditions) are true
-
Conditions
- (Terrain pathing at Point[9] of type Walkability is off) Equal to (==) True
- (Number of units in TempGroup) Greater than (>) 0
-
Conditions
-
Multiple ConditionsOr - Any (Conditions) are true
-
Then - Actions
- Special Effect - Create a special effect at Point[8] using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
- Special Effect - Destroy (Last created special effect)
- Unit Group - Remove (Picked unit) from Rushing_Group
- Set zzLoc1 = Point[9]
- Set zzLoc2 = Point[8]
- Set zzReal = (Angle from zzLoc1 to zzLoc2)
- Set zzReal2 = 25.00
- Set zzUnit = (Picked unit)
- Set zzInteger2 = 30
- Custom script: call RemoveLocation(udg_zzLoc1)
- Custom script: call RemoveLocation(udg_zzLoc2)
- Trigger - Run KnockBackAdd <gen> (checking conditions)
- Set TempUnit3 = (Picked unit)
-
Unit Group - Pick every unit in TempGroup and do (Actions)
-
Loop - Actions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Unit-type of (Picked unit)) Equal to (==) Marine
-
Then - Actions
- Set zzReal = (Facing of TempUnit3)
- Set zzReal2 = 25.00
- Set zzUnit = (Picked unit)
- Set zzInteger2 = 30
- Trigger - Run KnockBackAdd <gen> (checking conditions)
- Else - Actions
-
If - Conditions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
Else - Actions
- Set zzUnit = (Picked unit)
- Set zzReal = 100.00
- Custom script: set udg_zzX = GetUnitX(udg_zzUnit)
- Custom script: set udg_zzY = GetUnitY(udg_zzUnit)
- Set zzX = (zzX + ((Cos(Rushing_Angle[(Player number of (Owner of (Picked unit)))])) x zzReal))
- Set zzY = (zzY + ((Sin(Rushing_Angle[(Player number of (Owner of (Picked unit)))])) x zzReal))
- Custom script: if not IsTerrainPathable(udg_zzX, udg_zzY, PATHING_TYPE_WALKABILITY) then
- Custom script: call SetUnitX(udg_zzUnit,udg_zzX)
- Custom script: call SetUnitY(udg_zzUnit,udg_zzY)
- Custom script: endif
-
Set Rushing_Range[(Player number of (Owner of (Picked unit)))] = (Rushing_Range[(Player number of (Owner of (Picked unit)))] + 25.00)
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Rushing_Range[(Player number of (Owner of (Picked unit)))] Greater than or equal to (>=) 200.00
-
Then - Actions
- Unit Group - Remove (Picked unit) from Rushing_Group
-
Else - Actions
- Special Effect - Create a special effect at Point[8] using Objects\Spawnmodels\Undead\ImpaleTargetDust\ImpaleTargetDust.mdl
- Special Effect - Destroy (Last created special effect)
-
If - Conditions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Unit Group - Destroy unit group TempGroup
- Custom script: call RemoveLocation(udg_Point[8])
- Custom script: call RemoveLocation(udg_Point[9])
-
Else - Actions
- Unit Group - Remove (Picked unit) from Rushing_Group
-
If - Conditions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Number of units in Rushing_Group) Less than (<) 1
-
Then - Actions
- Trigger - Turn off (This trigger)
- Else - Actions
-
If - Conditions
-
Loop - Actions
-
Unit Group - Pick every unit in Rushing_Group and do (Actions)
-
Events
-
KnockBackAdd
- Events
- Conditions
-
Actions
-
Set zzBoolean = False
-
Do Multiple ActionsFor each (Integer A) from 1 to knockCount, do (Actions)
-
Loop - Actions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- knockZi[(Integer A)] Equal to (==) False
- zzBoolean Equal to (==) False
-
Then - Actions
- Set zzBoolean = True
- Set zzInteger = (Integer A)
- Else - Actions
-
If - Conditions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- zzBoolean Equal to (==) False
-
Then - Actions
- Set knockCount = (knockCount + 1)
- Set zzInteger = knockCount
- Else - Actions
-
If - Conditions
-
Do Multiple ActionsFor each (Integer A) from 1 to knockCount, do (Actions)
- -------- - --------
- Set knockAngle[zzInteger] = zzReal
- Set knockPower[zzInteger] = zzReal2
- Set knockUnit[zzInteger] = zzUnit
- Set knockTodo[zzInteger] = zzInteger2
- Set knockShould[zzInteger] = zzInteger2
- Set knockZi[zzInteger] = True
- Trigger - Turn on KnockBackMain <gen>
-
Set zzBoolean = False
-
KnockBackMain
-
Events
- Time - Every 0.03 seconds of game time
- Conditions
-
Actions
-
Do Multiple ActionsFor each (Integer A) from 1 to knockCount, do (Actions)
-
Loop - Actions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- knockZi[(Integer A)] Equal to (==) True
-
Then - Actions
- Set zzUnit = knockUnit[(Integer A)]
- Set zzReal = ((Real(knockTodo[(Integer A)])) / (Real(knockShould[(Integer A)])))
- Set zzReal = ((zzReal x zzReal) x knockPower[(Integer A)])
- Custom script: set udg_zzX = GetUnitX(udg_zzUnit)
- Custom script: set udg_zzY = GetUnitY(udg_zzUnit)
- Set zzX = (zzX + ((Cos(knockAngle[(Integer A)])) x zzReal))
- Set zzY = (zzY + ((Sin(knockAngle[(Integer A)])) x zzReal))
- Custom script: if not IsTerrainPathable(udg_zzX, udg_zzY, PATHING_TYPE_WALKABILITY) then
- Custom script: call SetUnitX(udg_zzUnit,udg_zzX)
- Custom script: call SetUnitY(udg_zzUnit,udg_zzY)
- Custom script: endif
-
Set knockTodo[(Integer A)] = (knockTodo[(Integer A)] - 1)
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- knockTodo[(Integer A)] Less than or equal to (<=) 0
-
Then - Actions
-
Set knockZi[(Integer A)] = False
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Integer A) Equal to (==) knockCount
-
Then - Actions
- Set knockCount = (knockCount - 1)
- Else - Actions
-
If - Conditions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Set knockZi[(Integer A)] = False
- Else - Actions
-
If - Conditions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Else - Actions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Integer A) Equal to (==) knockCount
-
Then - Actions
- Set knockCount = (knockCount - 1)
- If (knockCount Equal to (==) 0) then do (Trigger - Turn off (This trigger)) else do (Do nothing)
- Else - Actions
-
If - Conditions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
Do Multiple ActionsFor each (Integer A) from 1 to knockCount, do (Actions)
-
Events