- Joined
- Sep 16, 2016
- Messages
- 269
Up until now, I have always done MUI spells with array method and periodic timer (0.03125s). A friend told me it is make w3 run multiple loops O(n) by running integer loop, creating+destroying groups, which greatly causes Fps drop. I tested it with a simple CUSTOM spell and it went down from 55 to 29 fps with 10 casts (no cd).
I wonder if this is true then? (I believe it more than 70%). And if it were, what kind of method can I use then? This is totally in GUI so I hope you wouldn't answer things like GroupUtils or TimerUtils
Edit 2: add full triggers
I wonder if this is true then? (I believe it more than 70%). And if it were, what kind of method can I use then? This is totally in GUI so I hope you wouldn't answer things like GroupUtils or TimerUtils
-
Reset
-

Events
-


Player - Player 1 (Red) skips a cinematic sequence
-
-

Conditions
-

Actions
-


Set loc = (Position of Paladin 0001 <gen>)
-


Set SW_Count = (SW_Count + 1)
-


Set SW_Travel_Count[SW_Count] = 40
-


Set SW_Angle[SW_Count] = (Random real number between 0.00 and 360.00)
-


Memory Leak - Destroy SW_DamageGroup[SW_Count]
-


Set SW_DamageGroup[SW_Count] = (Create Unit Group)
-


Unit - Create 1 Dummy Caster for Neutral Passive at loc facing SW_Angle[SW_Count] degrees
-


Set SW_Missile[SW_Count] = (Last created unit)
-


Set SW_Caster[SW_Count] = Paladin 0001 <gen>
-


Memory Leak - Remove loc
-


Trigger - Turn on Untitled Trigger 001 <gen>
-
-
-
Untitled Trigger 001
-

Events
-


Time - Every (1.00 / 32.00) seconds of game time
-
-

Conditions
-

Actions
-


For each (Integer Int) from 1 to SW_Count, do (Actions)
-



Loop - Actions
-




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





If - Conditions
-






SW_Travel_Count[Int] Greater than 0
-
-





Then - Actions
-






Set SW_Travel_Count[Int] = (SW_Travel_Count[Int] - 1)
-






Set loc = (Position of SW_Missile[Int])
-






Set loc_1 = (loc offset by 31.25 towards SW_Angle[Int] degrees)
-






Unit - Move SW_Missile[Int] instantly to loc_1
-






Set TempUnitGroup = (Units within 165.00 of loc_1 matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is dead) Equal to False) and ((((Matching unit) is in SW_DamageGroup[Int]) Equal to False) and (((Matching unit) belongs to an enemy of (Owner of
-






Unit Group - Pick every unit in TempUnitGroup and do (Actions)
-







Loop - Actions
-








Unit - Cause SW_Caster[Int] to damage (Picked unit), dealing 200.00 damage of attack type Spells and damage type Magic
-








Unit Group - Add (Picked unit) to SW_DamageGroup[Int]
-
-
-






Memory Leak - Remove loc
-






Memory Leak - Remove loc_1
-






Memory Leak - Destroy TempUnitGroup
-
-





Else - Actions
-






Unit - Kill SW_Missile[Int]
-






Set SW_Angle[Int] = SW_Angle[SW_Count]
-






Set SW_Caster[Int] = SW_Caster[SW_Count]
-






Set SW_Missile[Int] = SW_Missile[SW_Count]
-






Set SW_Travel_Count[Int] = SW_Travel_Count[SW_Count]
-






Unit Group - Remove all units from SW_DamageGroup[Int]
-






Unit Group - Pick every unit in SW_DamageGroup[SW_Count] and do (Unit Group - Add (Picked unit) to SW_DamageGroup[Int])
-






Set Int = (Int - 1)
-






Set SW_Count = (SW_Count - 1)
-
-
-
-
-


If (SW_Count Equal to 0) then do (Trigger - Turn off (This trigger)) else do (Do nothing)
-
-
Edit 2: add full triggers
Last edited:



