Map is very laging then playing please help me.
I upload map
EA Start
I upload map
EA Start
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Shoot Arrow
-
Actions
- -------- --------------------------------------------------------------------------------------------------------- --------
- -------- Starting --------
- -------- --------------------------------------------------------------------------------------------------------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- MUI1 Equal to 0
-
Then - Actions
- Trigger - Turn on EA Movement <gen>
- Else - Actions
-
If - Conditions
- -------- --------------------------------------------------------------------------------------------------------- --------
- -------- Creating the current instanceo --------
- -------- --------------------------------------------------------------------------------------------------------- --------
- Set MUI1 = (MUI1 + 1)
- Set MUI2 = (MUI2 + 1)
- -------- --------------------------------------------------------------------------------------------------------- --------
- -------- Configurations for the instance --------
- -------- --------------------------------------------------------------------------------------------------------- --------
- Set EA_cUnit[MUI2] = (Triggering unit)
- Set EA_cPoint[MUI2] = (Position of (Triggering unit))
- Set EA_tPoint = (Target point of ability being cast)
- Set EA_Angle[MUI2] = (Angle from EA_cPoint[MUI2] to EA_tPoint)
- Set EA_Distance[MUI2] = 0.00
- -------- test --------
- -------- --------------------------------------------------------------------------------------------------------- --------
- -------- Dummy for the arrow --------
- -------- --------------------------------------------------------------------------------------------------------- --------
- Unit - Create 1 Projectile Dummy for (Owner of (Triggering unit)) at EA_cPoint[MUI2] facing EA_tPoint
- Set EA_Dummy[MUI2] = (Last created unit)
- Animation - Change EA_Dummy[MUI2] flying height to 70.00 at 0.00
- -------- --------------------------------------------------------------------------------------------------------- --------
- -------- These 2 below are very important --------
- -------- Don't miss them, they are the key of the entire spell --------
- -------- --------------------------------------------------------------------------------------------------------- --------
- Set EA_Timer[MUI2] = 0.00
- Set EA_Level[MUI2] = 0
- -------- --------------------------------------------------------------------------------------------------------- --------
- -------- Clearing possible leak --------
- -------- --------------------------------------------------------------------------------------------------------- --------
- Custom script: call RemoveLocation (udg_EA_tPoint)
-
Events
- Time - Every 0.03 seconds of game time
- Conditions
-
Actions
- -------- --------------------------------------------------------------------------------------------------------- --------
- -------- Looping through all running instances --------
- -------- --------------------------------------------------------------------------------------------------------- --------
-
For each (Integer MUI3) from 1 to MUI2, do (Actions)
-
Loop - Actions
- -------- --------------------------------------------------------------------------------------------------------- --------
- -------- Getting position, angles and moving the dummy --------
- -------- --------------------------------------------------------------------------------------------------------- --------
- Set EA_bPoint[MUI3] = (Position of EA_Dummy[MUI3])
- Set EA_mPoint[MUI3] = (EA_bPoint[MUI3] offset by 25.00 towards EA_Angle[MUI3] degrees)
- Set EA_Angle[MUI3] = (Angle from EA_cPoint[MUI3] to EA_mPoint[MUI3])
- Unit - Move EA_Dummy[MUI3] instantly to EA_mPoint[MUI3]
- -------- --------------------------------------------------------------------------------------------------------- --------
- -------- Saving the distance for later use --------
- -------- --------------------------------------------------------------------------------------------------------- --------
- Set EA_Distance[MUI3] = (Distance between EA_cPoint[MUI3] and EA_mPoint[MUI3])
- -------- --------------------------------------------------------------------------------------------------------- --------
- -------- Timer increment is very specific - don't change it --------
- -------- --------------------------------------------------------------------------------------------------------- --------
- Set EA_Timer[MUI3] = (EA_Timer[MUI3] + 4.13)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- EA_Timer[MUI3] Greater than or equal to 33.00
-
Then - Actions
- -------- --------------------------------------------------------------------------------------------------------- --------
- -------- This means, whenever the arrow travels 200 units, it means 1 second have passed --------
- -------- Thus, we have to increase the level of the stun ability which will be cast when it hits a target --------
- -------- Note: Level will increase by 1 for each 200 units, reaching level 10 (5 seconds stun) at 2000 range --------
- -------- --------------------------------------------------------------------------------------------------------- --------
- Set EA_Level[MUI3] = (EA_Level[MUI3] + 1)
- Set EA_Timer[MUI3] = 0.00
- Else - Actions
-
If - Conditions
- -------- --------------------------------------------------------------------------------------------------------- --------
- -------- The unit-group for the arrow and a specific unit for (the first from that group) --------
- -------- Which will be hit by the arrow if its an actual unit --------
- -------- --------------------------------------------------------------------------------------------------------- --------
- Set EA_Targets[MUI3] = (Units within 125.00 of EA_mPoint[MUI3] matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Unit-type of (Matching unit)) Not equal to Arrow) and (((Matching unit) belongs to an enemy of (Owner of
- Custom script: set udg_EA_HitUnit = FirstOfGroup(udg_EA_Targets[udg_MUI3])
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
- ((Playable map area) contains EA_Dummy[MUI3]) Equal to False
- EA_Distance[MUI3] Greater than or equal to 2000.00
- EA_HitUnit Not equal to No unit
-
Conditions
-
Or - Any (Conditions) are true
-
Then - Actions
- -------- --------------------------------------------------------------------------------------------------------- --------
- -------- Please note that this will also be executed if the arrow reaches the final point --------
- -------- The trigger was causing me some bugs so I merged the ITE functions --------
- -------- Thus I made the code smaller --------
- -------- On top of that a small summon won't hurt that much --------
- -------- --------------------------------------------------------------------------------------------------------- --------
- Set Damage = (Intelligence of EA_cUnit[MUI3] (Include bonuses))
- Set CritChance = (Real((Agility of EA_cUnit[MUI3] (Include bonuses))))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Random real number between 1.00 and 100.00) Less than or equal to CritChance
-
Then - Actions
- Set MissChange = (Real((Agility of EA_HitUnit (Include bonuses))))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (EA_HitUnit has buff Evade aura ) Equal to True
- (Random real number between 1.00 and 100.00) Less than or equal to MissChange
-
Then - Actions
- Floating Text - Create floating text that reads (|CFF790000 + (Miss + |r)) above EA_HitUnit with Z offset 0.00, using font size 8.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
- Floating Text - Change (Last created floating text): Disable permanence
- Floating Text - Set the velocity of (Last created floating text) to 80.00 towards 45.00 degrees
- Floating Text - Change the lifespan of (Last created floating text) to 1.25 seconds
- Floating Text - Change the fading age of (Last created floating text) to 0.90 seconds
- -------- --------------------------------------------------------------------------------------------------------- --------
- -------- Clearing all dummies the current instance configurations --------
- -------- --------------------------------------------------------------------------------------------------------- --------
- Unit - Kill EA_Dummy[MUI3]
- Set EA_Dummy[MUI3] = No unit
- -------- --------------------------------------------------------------------------------------------------------- --------
- -------- Dont forget to reset the timer - it may start from a different value for the next time and ruin the spell --------
- -------- --------------------------------------------------------------------------------------------------------- --------
- Set EA_Timer[MUI3] = 0.00
- Custom script: call RemoveLocation (udg_EA_cPoint[udg_MUI3])
- Set MUI1 = (MUI1 - 1)
-
Else - Actions
- Unit - Create 1 Caster Dummy for (Owner of EA_Dummy[MUI3]) at EA_mPoint[MUI3] facing Default building facing degrees
- Unit - Add Stun to (Last created unit)
- Unit - Set level of Stun for (Last created unit) to EA_Level[MUI3]
- Unit - Order (Last created unit) to Human Mountain King - Storm Bolt EA_HitUnit
- Unit - Cause EA_cUnit[MUI3] to damage EA_HitUnit, dealing (0.00 + (2.00 x (Real(Damage)))) damage of attack type Normal and damage type Normal
- Floating Text - Create floating text that reads (|CFF790000 Critical + (- + ( + ((String((2 x Damage))) + |r)))) above EA_HitUnit with Z offset 0.00, using font size 8.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
- Floating Text - Change (Last created floating text): Disable permanence
- Floating Text - Set the velocity of (Last created floating text) to 80.00 towards 45.00 degrees
- Floating Text - Change the lifespan of (Last created floating text) to 1.25 seconds
- Floating Text - Change the fading age of (Last created floating text) to 0.90 seconds
- Set DamageDone = (DamageDone + Damage)
- Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
- Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
- -------- --------------------------------------------------------------------------------------------------------- --------
- -------- Clearing all dummies the current instance configurations --------
- -------- --------------------------------------------------------------------------------------------------------- --------
- Unit - Kill EA_Dummy[MUI3]
- Set EA_Dummy[MUI3] = No unit
- -------- --------------------------------------------------------------------------------------------------------- --------
- -------- Dont forget to reset the timer - it may start from a different value for the next time and ruin the spell --------
- -------- --------------------------------------------------------------------------------------------------------- --------
- Set EA_Timer[MUI3] = 0.00
- Custom script: call RemoveLocation (udg_EA_cPoint[udg_MUI3])
- Set MUI1 = (MUI1 - 1)
-
If - Conditions
-
Else - Actions
- Set MissChange = (Real((Agility of EA_HitUnit (Include bonuses))))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (EA_HitUnit has buff Evade aura ) Equal to True
- (Random real number between 1.00 and 100.00) Less than or equal to MissChange
-
Then - Actions
- Floating Text - Create floating text that reads (|CFF790000 + (Miss + |r)) above EA_HitUnit with Z offset 0.00, using font size 8.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
- Floating Text - Change (Last created floating text): Disable permanence
- Floating Text - Set the velocity of (Last created floating text) to 80.00 towards 45.00 degrees
- Floating Text - Change the lifespan of (Last created floating text) to 1.25 seconds
- Floating Text - Change the fading age of (Last created floating text) to 0.90 seconds
- -------- --------------------------------------------------------------------------------------------------------- --------
- -------- Clearing all dummies the current instance configurations --------
- -------- --------------------------------------------------------------------------------------------------------- --------
- Unit - Kill EA_Dummy[MUI3]
- Set EA_Dummy[MUI3] = No unit
- -------- --------------------------------------------------------------------------------------------------------- --------
- -------- Dont forget to reset the timer - it may start from a different value for the next time and ruin the spell --------
- -------- --------------------------------------------------------------------------------------------------------- --------
- Set EA_Timer[MUI3] = 0.00
- Custom script: call RemoveLocation (udg_EA_cPoint[udg_MUI3])
- Set MUI1 = (MUI1 - 1)
-
Else - Actions
- Unit - Create 1 Caster Dummy for (Owner of EA_Dummy[MUI3]) at EA_mPoint[MUI3] facing Default building facing degrees
- Unit - Add Stun to (Last created unit)
- Unit - Set level of Stun for (Last created unit) to EA_Level[MUI3]
- Unit - Order (Last created unit) to Human Mountain King - Storm Bolt EA_HitUnit
- Set Damage = (Intelligence of EA_cUnit[MUI3] (Include bonuses))
- Set CritChance = (Real((Agility of EA_cUnit[MUI3] (Include bonuses))))
- Unit - Cause EA_cUnit[MUI3] to damage EA_HitUnit, dealing (0.00 + (1.00 x (Real((Intelligence of EA_cUnit[MUI3] (Include bonuses)))))) damage of attack type Normal and damage type Normal
- Floating Text - Create floating text that reads (|CFF790000 + (- + ( + ((String(Damage)) + |r)))) above EA_HitUnit with Z offset 0.00, using font size 8.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
- Floating Text - Change (Last created floating text): Disable permanence
- Floating Text - Set the velocity of (Last created floating text) to 80.00 towards 45.00 degrees
- Floating Text - Change the lifespan of (Last created floating text) to 1.25 seconds
- Floating Text - Change the fading age of (Last created floating text) to 0.90 seconds
- Set DamageDone = (DamageDone + Damage)
- Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
- Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
- -------- --------------------------------------------------------------------------------------------------------- --------
- -------- Clearing all dummies the current instance configurations --------
- -------- --------------------------------------------------------------------------------------------------------- --------
- Unit - Kill EA_Dummy[MUI3]
- Set EA_Dummy[MUI3] = No unit
- -------- --------------------------------------------------------------------------------------------------------- --------
- -------- Dont forget to reset the timer - it may start from a different value for the next time and ruin the spell --------
- -------- --------------------------------------------------------------------------------------------------------- --------
- Set EA_Timer[MUI3] = 0.00
- Custom script: call RemoveLocation (udg_EA_cPoint[udg_MUI3])
- Set MUI1 = (MUI1 - 1)
-
If - Conditions
-
If - Conditions
- Else - Actions
-
If - Conditions
- -------- --------------------------------------------------------------------------------------------------------- --------
- -------- Clearing all possible leaks for the looped instance --------
- -------- --------------------------------------------------------------------------------------------------------- --------
- Custom script: call DestroyGroup (udg_EA_Targets[udg_MUI3])
- Custom script: set udg_EA_HitUnit = null
- Custom script: call RemoveLocation (udg_EA_bPoint[udg_MUI3])
- Custom script: call RemoveLocation (udg_EA_mPoint[udg_MUI3])
-
Loop - Actions
- -------- --------------------------------------------------------------------------------------------------------- --------
- -------- If all instances are done - stopping the trigger to prevent lag or memory loss --------
- -------- --------------------------------------------------------------------------------------------------------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- MUI1 Equal to 0
-
Then - Actions
- Set MUI2 = 0
- Trigger - Turn off (This trigger)
- Else - Actions
-
If - Conditions
-
Events
- Time - Elapsed game time is 0.01 seconds
- Conditions
-
Actions
- -------- ----------------------------------------------------------------------------------------------------- --------
- -------- Point for preload --------
- -------- ----------------------------------------------------------------------------------------------------- --------
- Set Preload_Point = (Center of (Playable map area))
- -------- ----------------------------------------------------------------------------------------------------- --------
- -------- Dummy for the abilities --------
- -------- ----------------------------------------------------------------------------------------------------- --------
- Unit - Create 1 Caster Dummy for Neutral Passive at Preload_Point facing Default building facing degrees
- Unit - Add Shoot Arrow to (Last created unit)
- Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
- -------- ----------------------------------------------------------------------------------------------------- --------
- -------- Preloading SFXs as well --------
- -------- ----------------------------------------------------------------------------------------------------- --------
- Special Effect - Create a special effect at Preload_Point using Abilities\Weapons\BallistaMissile\BallistaMissile.mdl
- Special Effect - Destroy (Last created special effect)
- -------- ----------------------------------------------------------------------------------------------------- --------
- -------- Clearing possible leak --------
- -------- ----------------------------------------------------------------------------------------------------- --------
- Custom script: call RemoveLocation (udg_Preload_Point)