Dose this trigger cause leak ? if does , how to remove it ...

M0RBiD

New Member
Reaction score
0
Code:
Cast
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to (some ability)
    Actions
        Special Effect - Create a special effect at (Target point of ability being cast) using Abilities\Spells\Human\FlameStrike\FlameStrike1.mdl
        Set LSA_CS = (Casting unit)
        Set LSA_LV = (Level of Light Strike Array ( lina ) for LSA_CS)
        Set LSA_UG = (Units within 231.00 of (Target point of ability being cast) matching (((Matching unit) belongs to an enemy of (Owner of (Casting unit))) Equal to True))
        Unit - Order LSA_CS to Stop
        Unit Group - Pick every unit in LSA_UG and do (Actions)
            Loop - Actions
                Unit - Create 1 Light Strike Array Dummy Caster for (Owner of LSA_CS) at (Position of (Picked unit)) facing Default building facing degrees
                Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
                Unit - Set level of Light Array Stun  for (Last created unit) to LSA_LV
                Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Picked unit)
        Custom script:   call DestroyGroup (udg_LSA_UG)

tnx anyway ...
 

trb92

Throwing science at the wall to see what sticks
Reaction score
142
Code:
Cast
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to (some ability)
    Actions
        [COLOR="red"]Set Point = (Target point of ability being cast)[/COLOR]
        Special Effect - Create a special effect at [COLOR="red"]Point[/COLOR] using Abilities\Spells\Human\FlameStrike\FlameStrike1.mdl
        Set LSA_CS = (Casting unit)
        Set LSA_LV = (Level of Light Strike Array ( lina ) for LSA_CS)
        Set LSA_UG = (Units within 231.00 of [COLOR="red"]Point[/COLOR] matching (((Matching unit) belongs to an enemy of (Owner of (Casting unit))) Equal to True))
        Unit - Order LSA_CS to Stop
        Unit Group - Pick every unit in LSA_UG and do (Actions)
            Loop - Actions
                [COLOR="red"]Set Point2 = (Position of (Picked unit))[/COLOR]
                Unit - Create 1 Light Strike Array Dummy Caster for (Owner of LSA_CS) at [COLOR="red"]Point2[/COLOR] facing Default building facing degrees
                Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
                Unit - Set level of Light Array Stun  for (Last created unit) to LSA_LV
                Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Picked unit)
                [COLOR="red"]Custom script:   call RemoveLocation (udg_Point2)[/COLOR]
        Custom script:   call DestroyGroup (udg_LSA_UG)
        [COLOR="red"]Custom script:   call RemoveLocation (udg_Point)[/COLOR]

Changes that need to be made to make it leakless are in red
 

M0RBiD

New Member
Reaction score
0
@trb92 : So thaks man ... but another question and again about leaks ...
Does Floating text cause leak ?!:confused:
If cause what should i do or not to do , to remove memory leaks of a floating text ?
I hate Leaks !!
sry for too much questions ...
my english is not so good plz explain it simply !!
tnx anyone helps ...
+rep for trb92
 

Darthfett

Aerospace/Cybersecurity Software Engineer
Reaction score
615
M0RBiD, have you looked at any of our memory leak / lag tutorials in the tutorials and resources section?

As for floating text, you have to disable their "permanence" (there's a specific GUI action for that), and then give them a time/life. Once the time expires, if they are not permanent, they will be automatically recycled.
 

Inflicted

Currently inactive
Reaction score
63
It's not the text-tag that leaks, more the location that is assigned with it.

If permanence is declared, as said above. And the global temp variable is removed, then it should be fine.
 
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