crystalguard
New Member
- Reaction score
- 11
Stopping Lag and Making Spell MUI
Ok well im making skill, but cannot figure out how to make it MUI, also when ever it gets cast like 7 or more times, a really bad lagg occours, but im noobish at finding leaks. I was wondering if anyone could help me fix this trigger to make it both MUI and leakless (or as close as possible)
Triggers:
--------------------------------------------------------------------------
-------------------------------------------------------------------------
=========================================================
People who help get +rep
Ok well im making skill, but cannot figure out how to make it MUI, also when ever it gets cast like 7 or more times, a really bad lagg occours, but im noobish at finding leaks. I was wondering if anyone could help me fix this trigger to make it both MUI and leakless (or as close as possible)
Triggers:
Code:
Start Move
Events
Unit - A unit Starts the effect of an ability
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Ability being cast) Equal to Whirlpool
Then - Actions
Set Caster_WP = (Casting unit)
Set Center_Circle_WP[(Player number of (Owner of Caster_WP))] = (Target point of ability being cast)
Unit - Create 1 WP Dummy for (Owner of Caster_WP) at (Center_Circle_WP[(Player number of (Owner of Caster_WP))] offset by 100.00 towards (360.00 / 36.00) degrees) facing Default building facing degrees
Set Dummy4 = (Last created unit)
Unit - Add a 4.30 second Generic expiration timer to Dummy4
Unit Group - Add Dummy4 to Whirlpool
Countdown Timer - Start Timer[(Player number of (Owner of Caster_WP))] as a One-shot timer that will expire in 5.00 seconds
Set Timer[(Player number of (Owner of Caster_WP))] = (Last started timer)
Custom script: set udg_Dummy4 = null
Else - Actions
Custom script: call RemoveLocation (udg_Picked_Loc)
Custom script: set udg_Picked = null
--------------------------------------------------------------------------
Code:
Movement
Events
Time - Every 0.04 seconds of game time
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in Whirlpool) Greater than or equal to 1
Then - Actions
Unit Group - Pick every unit in Whirlpool and do (Actions)
Loop - Actions
Set Picked = (Picked unit)
Set Picked_Loc = (Position of Picked)
Unit - Move (Picked unit) instantly to (Center_Circle_WP[(Player number of (Owner of Caster_WP))] offset by 80.00 towards ((Angle from Center_Circle_WP[(Player number of (Owner of Caster_WP))] to Picked_Loc) + 8.00) degrees)
Unit Group - Pick every unit in (Units within 150.00 of Picked_Loc matching ((((Matching unit) is A structure) Not equal to True) and ((((Matching unit) is A ground unit) Equal to True) and ((((Matching unit) is hidden) Not equal to True) and ((((Matching unit) is Magic Immune) Not equal to and do (Actions)
Loop - Actions
Set Picked = (Picked unit)
Unit - Cause Caster_WP to damage Picked, dealing ((Real((Level of Whirlpool for Caster_WP))) x 2.00) damage of attack type Spells and damage type Lightning
Else - Actions
Custom script: set udg_Caster_WP = null
Custom script: call RemoveLocation (udg_Center_Circle_WP[GetConvertedPlayerId(GetOwningPlayer(udg_Caster_WP))])
-------------------------------------------------------------------------
=========================================================
People who help get +rep