leak or lag?

cleeezzz

The Undead Ranger.
Reaction score
268
Leak or just regular game lag?

Code:
Freezing Cold
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Player 11 (Dark Green) Food used) Less than 50
            Then - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Level of F|cffffcc00r|reezing Cold  for Ice_mage) Greater than 0
                    Then - Actions
                        Custom script:   set  bj_wantDestroyGroup = true
                        Unit Group - Pick every unit in (Units owned by Player 12 (Brown) matching (((Matching unit) is alive) Equal to True)) and do (Actions)
                            Loop - Actions
                                Unit - Cause Ice_mage to damage (Picked unit), dealing ((1.00 / (Real(Temp))) x (Real((Intelligence of Ice_mage (Include bonuses))))) damage of attack type Spells and damage type Normal
                    Else - Actions
            Else - Actions

brown has about 150 units
 

Mapster

New Member
Reaction score
4
I would say lagg but i'm not toosure.

It isn't destroying the group afterwards?
 

esb

Because none of us are as cruel as all of us.
Reaction score
329
Maybe add a small wait at the end of the loop. Looks like lag.
 

waaaks!

Zinctified
Reaction score
255
Code:
Unit - Cause Ice_mage to damage (Picked unit), dealing ((1.00 / (Real([COLOR="Red"]Temp[/COLOR]))) x (Real((Intelligence of Ice_mage (Include bonuses))))) damage of attack type Spells and damage type Normal
                    Else - Actions
where is the setting of the red text?
u didnt set a variable called temp...

i think making the unitgroup a variable, instead of creating it directly
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
888
I always use a variable for Unit Groups and destroy them after use. I don't think it makes any difference, though.

> where is the setting of the red text?

Irrelevant, I would think. Integers never leak.
 

cleeezzz

The Undead Ranger.
Reaction score
268
yea i changed the temp (temperature) to Player 11 food used. (my map has some skills based on the temperature to inflict more dmg.)

eh gotta live with the lag then. lol
note: its not horrible, it just annoys me
 

SFilip

Gone but not forgotten
Reaction score
634
At the very least this trigger is inefficient which is probably the reason for this "lag" you're experiencing. Never use a periodic event when there is another option.
In this case you can use the event Player - Properties, set the property to Food used...you should know what to do afterwards.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      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