Stopping Lag and Making Spell MUI (was: Help Please!!)

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:

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
 

Kenoriga

Ultra Cool Member
Reaction score
34
Caster_WP ought to be arrayed? Cuz if 2 units cast it at the same time, the one that cast it first might get overwritten.

Code:
                Custom script:   call RemoveLocation (udg_Picked_Loc)
                Custom script:   set udg_Picked = null
These should be in your Unit Group Loop Actions if I am not wrong.

Code:
                Custom script:   call RemoveLocation (udg_Center_Circle_WP[GetConvertedPlayerId(GetOwningPlayer(udg_Caster_WP))])
This can be in your 'Start Move" trigger's "Then - Actions", since you don't need it afterwards anyway.
 

crystalguard

New Member
Reaction score
11
Code:
 Custom script:   call RemoveLocation (udg_Center_Circle_WP[GetConvertedPlayerId(GetOwningPlayer(udg_Caster_WP))])
This can be in your 'Start Move" trigger's "Then - Actions", since you don't need it afterwards anyway.
This actully is used after the start move tirgger, its the main point in

Code:
Unit - Move (Picked unit) instantly to ([B]Center_Circle_WP[/B][(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)

Caster_WP ought to be arrayed? Cuz if 2 units cast it at the same time, the one that cast it first might get overwritten.


Code:
Code:
                Custom script:   call RemoveLocation (udg_Picked_Loc)
                Custom script:   set udg_Picked = null
These should be in your Unit Group Loop Actions if I am not wrong.
Ok ill give it a try

tags, use them.
Was gonna, but I forgot the tags and the button wasn't working :/

dont have time to look at your trigger
but read this tut. for making MUI triggers http://www.thehelper.net/forums/showthread.php?t=83500

Ok i'll check it out

are there alot of units in that group? if you are moving a large number of units at once, 25 times a second, your gonna get lag.

It will rarly have more than 5-6 units in the group, considering that the spell only lasts like 5 secnds and the cooldown is about 10, also the max number of players in the map im makeing is 8 (3 on each team and 1 computer on each team)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top