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.
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +1
  • V-SNES V-SNES:
    Happy Friday!
    +1

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top