Back to work with a lot of problems

HL.Clockwork

New Member
Reaction score
5
Hi,
about 6 month ago i stoped building my map, demotivated by the lag which i couldn´t fix.

Now am back, but not able to find a way to fix the lag problem by my own. I hope that some crazy superbrains here can help me again ;)

My map is a TD with a lot of tower that have special abilities.

There are two types of lags in my map.

The first type is a "rising" lag. My map have 45 rounds, till round 10 to 20 everything is fine. Then people with not highend machines realize little lags which will grow to little freezes. The last 5 rounds are hell :(

I try to fix this, by checking every trigger for leaks. I am not able to find anymore :( checked em over and over again...
I spend nights searching this forum for tips. It got better but was not fixed at all.

The seconds type is a lag caused by 3 new towers i added, which use a new system i needed to make near mui spell. But it seems that they do not work as intended.


Here is the trigger:
Trigger:
  • slow motion
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Slow-Motion
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • MUI_motion Less than or equal to 100
        • Then - Actions
          • Set MUI_motion = (MUI_motion + 1)
        • Else - Actions
          • Set MUI_motion = 0
      • -------- Variables --------
      • Set OverTime = 5.00
      • Set Target_motion[MUI_motion] = (Target unit of ability being cast)
      • Set SpeedOverTime = ((Current movement speed of Target_motion[MUI_motion]) / (OverTime x 2.00))
      • -------- Dummy Unit Debuff --------
      • Set slow_mo_lok = (Position of Target_motion[MUI_motion])
      • Unit - Create 1 Dummy Unit slowmotion for (Owner of (Triggering unit)) at slow_mo_lok facing Default building facing (270.0) degrees
      • Unit - Add Dummy Ability - ReversePurge to (Last created unit)
      • Unit - Order (Last created unit) to Night Elf Warden - Shadow Strike Target_motion[MUI_motion]
      • Unit - Add a 3.00 second Water Elemental expiration timer to (Last created unit)
      • Custom script: call RemoveLocation (udg_slow_mo_lok)
      • -------- Dummy Unit --------
      • Set slow_mo_lok = (Position of (Triggering unit))
      • Unit - Create 1 Dummy Unit slowmotion for (Owner of (Triggering unit)) at slow_mo_lok facing Default building facing (270.0) degrees
      • Unit - Set the custom value of (Last created unit) to MUI_motion
      • Unit Group - Add (Last created unit) to slow_motion_group
      • Custom script: call RemoveLocation (udg_slow_mo_lok)



Trigger:
  • slow motion periodic
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
      • (Number of units in slow_motion_group) Greater than 0
    • Actions
      • Unit Group - Pick every unit in slow_motion_group and do (Actions)
        • Loop - Actions
          • Set MUI_GO_motion = (Custom value of (Picked unit))
          • Set Wait_motion[MUI_GO_motion] = (Wait_motion[MUI_GO_motion] + 0.50)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Wait_motion[MUI_GO_motion] Less than or equal to OverTime
              • (Current movement speed of Target_motion[MUI_GO_motion]) Greater than 0.00
            • Then - Actions
              • Unit - Set Target_motion[MUI_GO_motion] movement speed to ((Current movement speed of Target_motion[MUI_GO_motion]) - SpeedOverTime)
            • Else - Actions
              • Unit - Set Target_motion[MUI_GO_motion] movement speed to (Default movement speed of Target_motion[MUI_GO_motion])
              • Unit Group - Remove (Picked unit) from slow_motion_group
              • Unit - Remove (Picked unit) from the game
              • Set Wait_motion[MUI_GO_motion] = 0.00



Link to my map: http://www.thehelper.net/forums/showthread.php?t=111057


I really wanna continue my work, but i am not able with out some help to get rid of these lags. Thanks to everyone who takes a second to think about my problem.
 

Accname

2D-Graphics enthusiast
Reaction score
1,464
would be much better if you would upload an unprotected version instead of a protected one. sorry but we cannot help you until we see your triggers.
 

HL.Clockwork

New Member
Reaction score
5
would be much better if you would upload an unprotected version instead of a protected one. sorry but we cannot help you until we see your triggers.

i will post some examples of my triggers, the way 80% are done:

Abilities

Trigger:
  • fatalblow
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacking unit)) Equal to Dragony
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Percentage life of (Attacked unit)) Less than or equal to 25.00
        • Then - Actions
          • Set fatal_pos = (Position of (Attacked unit))
          • Floating Text - Create floating text that reads (String((Integer(450.00)))) at fatal_pos with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Set the velocity of (Last created floating text) to 15.00 towards 90.00 degrees
          • Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
          • Floating Text - Change the age of (Last created floating text) to 1.00 seconds
          • Unit - Cause (Attacking unit) to damage (Attacked unit), dealing (204.00 x 3.00) damage of attack type Normal and damage type Normal
          • Custom script: call RemoveLocation(udg_fatal_pos)
        • Else - Actions



Trigger:
  • gore
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacking unit)) Equal to Gore-Spawn
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • count_warmonger[(Player number of (Owner of (Attacking unit)))] Less than or equal to 50
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Random integer number between 1 and 100) Less than or equal to (count_warmonger[(Player number of (Owner of (Attacking unit)))] x 2)
            • Then - Actions
              • Set gore_lok = (Position of (Attacking unit))
              • Animation - Play (Attacking unit)'s attack animation
              • Unit - Cause (Attacking unit) to damage (Attacked unit), dealing (Real((count_reaver[(Player number of (Owner of (Attacking unit)))] x count_slasher[(Player number of (Owner of (Attacking unit)))]))) damage of attack type Siege and damage type Normal
              • Floating Text - Create floating text that reads (String((count_reaver[(Player number of (Owner of (Attacking unit)))] x count_slasher[(Player number of (Owner of (Attacking unit)))]))) at gore_lok with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
              • Floating Text - Change (Last created floating text): Disable permanence
              • Floating Text - Set the velocity of (Last created floating text) to 15.00 towards 90.00 degrees
              • Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
              • Floating Text - Change the age of (Last created floating text) to 1.00 seconds
              • Custom script: call RemoveLocation(udg_gore_lok)
            • Else - Actions
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • count_warmonger[(Player number of (Owner of (Attacking unit)))] Greater than 50
            • Then - Actions
              • Set gore_lok = (Position of (Attacking unit))
              • Animation - Play (Attacking unit)'s attack animation
              • Unit - Cause (Attacking unit) to damage (Attacked unit), dealing (Real((count_reaver[(Player number of (Owner of (Attacking unit)))] x count_slasher[(Player number of (Owner of (Attacking unit)))]))) damage of attack type Siege and damage type Normal
              • Floating Text - Create floating text that reads (String((count_reaver[(Player number of (Owner of (Attacking unit)))] x count_slasher[(Player number of (Owner of (Attacking unit)))]))) at gore_lok with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
              • Floating Text - Change (Last created floating text): Disable permanence
              • Floating Text - Set the velocity of (Last created floating text) to 15.00 towards 90.00 degrees
              • Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
              • Floating Text - Change the age of (Last created floating text) to 1.00 seconds
              • Custom script: call RemoveLocation(udg_gore_lok)
            • Else - Actions


Trigger:
  • burst
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacking unit)) Equal to Ironbreaker
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Attacked unit) has buff bursted (Ergänzend)) Equal to False
        • Then - Actions
          • Unit - Order (Attacking unit) to Neutral Alchemist - Acid Bomb (Attacked unit)
        • Else - Actions


Movement

Trigger:
  • spawn to LO
    • Events
      • Unit - A unit enters Spawn Red <gen>
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Owner of (Entering unit)) Equal to Player 9 (Gray)
          • (Owner of (Entering unit)) Equal to Player 10 (Light Blue)
          • (Owner of (Entering unit)) Equal to Player 11 (Dark Green)
          • (Owner of (Entering unit)) Equal to Player 12 (Brown)
    • Actions
      • Set pos_red_LO = (Center of red LO <gen>)
      • Unit - Make (Entering unit) Invulnerable
      • Unit - Order (Entering unit) to Move To pos_red_LO
      • For each (Integer A) from 1 to 45, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Entering unit) Equal to hero_unit_9[(Integer A)]
            • Then - Actions
              • Set hero_orders_9[(Integer A)] = (Center of red LO <gen>)
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Entering unit) Equal to hero_unit_10[(Integer A)]
            • Then - Actions
              • Set hero_orders_10[(Integer A)] = (Center of red LO <gen>)
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Entering unit) Equal to hero_unit_11[(Integer A)]
            • Then - Actions
              • Set hero_orders_11[(Integer A)] = (Center of red LO <gen>)
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Entering unit) Equal to hero_unit_12[(Integer A)]
            • Then - Actions
              • Set hero_orders_12[(Integer A)] = (Center of red LO <gen>)
            • Else - Actions
      • Custom script: call RemoveLocation(udg_pos_red_LO)




Spawn

Trigger:
  • Next Round
    • Events
      • Time - td_timer expires
    • Conditions
    • Actions
      • Set spawn_red = (Center of Spawn Red <gen>)
      • Set spawn_teal = (Center of Spawn Teal <gen>)
      • Set spawn_blue = (Center of Spawn Blue <gen>)
      • Set spawn_purpel = (Center of Spawn Purpel <gen>)
      • Sound - Play WarlockAppears <gen>
      • Countdown Timer - Change the title of (Last created timer window) to (Round: + ((String(roundcount)) + of 45))
      • Unit - Create 1 wave[roundcount] for Player 9 (Gray) at spawn_red facing 0.00 degrees
      • Unit - Create 1 wave[roundcount] for Player 10 (Light Blue) at spawn_teal facing 0.00 degrees
      • Unit - Create 1 wave[roundcount] for Player 11 (Dark Green) at spawn_blue facing 0.00 degrees
      • Unit - Create 1 wave[roundcount] for Player 12 (Brown) at spawn_purpel facing 0.00 degrees
      • Wait 0.10 seconds
      • Unit - Create 1 wave[roundcount] for Player 9 (Gray) at spawn_red facing 0.00 degrees
      • Unit - Create 1 wave[roundcount] for Player 10 (Light Blue) at spawn_teal facing 0.00 degrees
      • Unit - Create 1 wave[roundcount] for Player 11 (Dark Green) at spawn_blue facing 0.00 degrees
      • Unit - Create 1 wave[roundcount] for Player 12 (Brown) at spawn_purpel facing 0.00 degrees
      • Wait 0.10 seconds
      • Unit - Create 1 wave[roundcount] for Player 9 (Gray) at spawn_red facing 0.00 degrees
      • Unit - Create 1 wave[roundcount] for Player 10 (Light Blue) at spawn_teal facing 0.00 degrees
      • Unit - Create 1 wave[roundcount] for Player 11 (Dark Green) at spawn_blue facing 0.00 degrees
      • Unit - Create 1 wave[roundcount] for Player 12 (Brown) at spawn_purpel facing 0.00 degrees
      • Wait 0.10 seconds
      • Unit - Create 1 wave[roundcount] for Player 9 (Gray) at spawn_red facing 0.00 degrees
      • Unit - Create 1 wave[roundcount] for Player 10 (Light Blue) at spawn_teal facing 0.00 degrees
      • Unit - Create 1 wave[roundcount] for Player 11 (Dark Green) at spawn_blue facing 0.00 degrees
      • Unit - Create 1 wave[roundcount] for Player 12 (Brown) at spawn_purpel facing 0.00 degrees
      • Wait 0.10 seconds
      • Unit - Create 1 wave[roundcount] for Player 9 (Gray) at spawn_red facing 0.00 degrees
      • Unit - Create 1 wave[roundcount] for Player 10 (Light Blue) at spawn_teal facing 0.00 degrees
      • Unit - Create 1 wave[roundcount] for Player 11 (Dark Green) at spawn_blue facing 0.00 degrees
      • Unit - Create 1 wave[roundcount] for Player 12 (Brown) at spawn_purpel facing 0.00 degrees
      • Wait 0.10 seconds
      • Unit - Create 1 wave[roundcount] for Player 9 (Gray) at spawn_red facing 0.00 degrees
      • Unit - Create 1 wave[roundcount] for Player 10 (Light Blue) at spawn_teal facing 0.00 degrees
      • Unit - Create 1 wave[roundcount] for Player 11 (Dark Green) at spawn_blue facing 0.00 degrees
      • Unit - Create 1 wave[roundcount] for Player 12 (Brown) at spawn_purpel facing 0.00 degrees
      • Wait 0.10 seconds
      • Unit - Create 1 wave[roundcount] for Player 9 (Gray) at spawn_red facing 0.00 degrees
      • Unit - Create 1 wave[roundcount] for Player 10 (Light Blue) at spawn_teal facing 0.00 degrees
      • Unit - Create 1 wave[roundcount] for Player 11 (Dark Green) at spawn_blue facing 0.00 degrees
      • Unit - Create 1 wave[roundcount] for Player 12 (Brown) at spawn_purpel facing 0.00 degrees
      • Wait 0.10 seconds
      • Unit - Create 1 wave[roundcount] for Player 9 (Gray) at spawn_red facing 0.00 degrees
      • Unit - Create 1 wave[roundcount] for Player 10 (Light Blue) at spawn_teal facing 0.00 degrees
      • Unit - Create 1 wave[roundcount] for Player 11 (Dark Green) at spawn_blue facing 0.00 degrees
      • Unit - Create 1 wave[roundcount] for Player 12 (Brown) at spawn_purpel facing 0.00 degrees
      • Wait 0.10 seconds
      • Unit - Create 1 wave[roundcount] for Player 9 (Gray) at spawn_red facing 0.00 degrees
      • Unit - Create 1 wave[roundcount] for Player 10 (Light Blue) at spawn_teal facing 0.00 degrees
      • Unit - Create 1 wave[roundcount] for Player 11 (Dark Green) at spawn_blue facing 0.00 degrees
      • Unit - Create 1 wave[roundcount] for Player 12 (Brown) at spawn_purpel facing 0.00 degrees
      • Wait 0.10 seconds
      • Unit - Create 1 wave[roundcount] for Player 9 (Gray) at spawn_red facing 0.00 degrees
      • Unit - Create 1 wave[roundcount] for Player 10 (Light Blue) at spawn_teal facing 0.00 degrees
      • Unit - Create 1 wave[roundcount] for Player 11 (Dark Green) at spawn_blue facing 0.00 degrees
      • Unit - Create 1 wave[roundcount] for Player 12 (Brown) at spawn_purpel facing 0.00 degrees
      • Countdown Timer - Start herotimer as a One-shot timer that will expire in 35.00 seconds
      • Set roundcount = (roundcount + 1)
      • For each (Integer B) from 1 to 4, do (Actions)
        • Loop - Actions
          • Game - Display to (Player((Integer B))), at offset (0.00, 0.00) the text: (Round: + (<Empty String> + (<Empty String> + ((Name of (Last created unit)) + s))))
      • Custom script: call RemoveLocation(udg_spawn_red)
      • Custom script: call RemoveLocation(udg_spawn_teal)
      • Custom script: call RemoveLocation(udg_spawn_blue)
      • Custom script: call RemoveLocation(udg_spawn_purpel)

i know that tis spawn look very crapy but any other loop system did not work ^^
 

Accname

2D-Graphics enthusiast
Reaction score
1,464
i looked through all of your triggers (yes i really did...) and havent found any leak. (though i am not sure about the (Player((Integer B))) message because its using a force variable)
but i see some general flaws of your triggers and useless actions which might be deleted to save up some space.
 

HL.Clockwork

New Member
Reaction score
5
i looked through all of your triggers (yes i really did...) and havent found any leak. (though i am not sure about the (Player((Integer B))) message because its using a force variable)
but i see some general flaws of your triggers and useless actions which might be deleted to save up some space.

first thank u very much :)

i know that this trigger are not that perfect ;) could u make an example where this flaws are?

do u think this flaws cause a rising lag?

and what about the trigger in the first post? the slowmotion thing. It does generate huge lags in game. But not if u test it with a single tower, just when the map was running about 20min then this trigger causes lag, even when i only use one. And it is intended that 4 player could use up to 10 of these tower at the some time.

well i thougt about sending an unprotected map, so someone real pro could have a look to the system overall.

i really need help to fix it.
Maybe there is somewhere a big bad leak that is very sneaky :D

whats your suggestion to do next?
 

Accname

2D-Graphics enthusiast
Reaction score
1,464
first of all using the event "unit is attacked" is not as good as "unit takes damage" when using a custom damage dealing system.
the action:
Trigger:
  • Floating Text - Change the age of (Last created floating text) to 1.00 seconds

is also useless, i think what you intended to do was:
Trigger:
  • # Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds


the real mess is your spawn trigger, better do it like this:
Trigger:
  • For each (Integer A) from 1 to 10, do (Actions)
    • Loop - Actions
      • For each (Integer B) from 1 to 4, do (Actions)
        • Loop - Actions
          • Unit - Create 1 wave[roundcount] for Player(Integer B) at spawn_red facing 0.00 degrees
          • Unit - Create 1 wave[roundcount] for Player(Integer B) at spawn_teal facing 0.00 degrees
          • Unit - Create 1 wave[roundcount] for Player(Integer B) at spawn_blue facing 0.00 degrees
          • Unit - Create 1 wave[roundcount] for Player(Integer B) at spawn_purpel facing 0.00 degrees
          • Wait 0.10 seconds

i hope this will help you though it wont remove any leaks because there arent any.
 

HL.Clockwork

New Member
Reaction score
5
Making the corpse delay time shorter may help, they stay for a long time =x.

already done, effect was equal to zero :/


first of all using the event "unit is attacked" is not as good as "unit takes damage" when using a custom damage dealing system.

thanks ill look for a good dds - any advise which tut is good and useful?
or maybe be more specific how this works? i never understood how this thing with Trigger - Add to TriggerName <gen> the event (Unit - (Triggering unit) Takes damage) works :/

the action:
Trigger:
  • Floating Text - Change the age of (Last created floating text) to 1.00 seconds

is also useless, i think what you intended to do was:
Trigger:
  • # Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds

just found this somewhere in the forum - worked until now ;) but ill have a look .


the real mess is your spawn trigger, better do it like this:
Trigger:
  • For each (Integer A) from 1 to 10, do (Actions)
    • Loop - Actions
      • For each (Integer B) from 1 to 4, do (Actions)
        • Loop - Actions
          • Unit - Create 1 wave[roundcount] for Player(Integer B) at spawn_red facing 0.00 degrees
          • Unit - Create 1 wave[roundcount] for Player(Integer B) at spawn_teal facing 0.00 degrees
          • Unit - Create 1 wave[roundcount] for Player(Integer B) at spawn_blue facing 0.00 degrees
          • Unit - Create 1 wave[roundcount] for Player(Integer B) at spawn_purpel facing 0.00 degrees
          • Wait 0.10 seconds

i hope this will help you though it wont remove any leaks because there arent any.
i try this with a loop system, but it never worked. The loop stoped always after random 1 to 4 recurrences. never figured out why.




But i think all this won´t fix my lag problem :/
 

Gwypaas

hook DoNothing MakeGUIUsersCrash
Reaction score
50
Make a trigger that after every round picks all corpses and removes them. If you dont do that already I belive that should fix parts of your lagg problems.
 

deebee

New Member
Reaction score
15
You cant use waits in loops

If you believe the slow motion is causing the lag, disable it/remove it and see if it lags end game.
 

HL.Clockwork

New Member
Reaction score
5
Make a trigger that after every round picks all corpses and removes them. If you dont do that already I belive that should fix parts of your lagg problems.

i do not really have "rounds" that end after all units are dead and i am using "corpse" for some spells. I choose to use "Decay time Bones (secs) to 30 seconds. Read somewhere it is the same as remove.

I did some new testings. The slowmotion causes an initial 10frames loss for 1 to 3 seconds, then frames return to normal behaviour. :confused::confused::confused:

Frame behaviour:
Tests with two players. We decided for "mass tower" races.

Beginning: 65/65 frames - both variing 65 to 60. I am using periodic trigger all 5 secs. maybe those... [5 to 10 towers per player]

Midgame: 50/45 frames - vari ~10 [20 to 40 tower per player]

Endgame: down to 20 or lower. [we sold our towers, but did not regain full framerate. max was 60 most time lower.

ca. 20seconds blackscreen after the game ends.



in previous versions i reworked all missel and cast animation to be less glowing etc, but now i think the "bling bling" shoud be ok.

I dont understand it at all.
There are not more than 100 towers per player. (i have seen maps with more)
There are never more then 70 units running around. (i have seen more)
 

Gwypaas

hook DoNothing MakeGUIUsersCrash
Reaction score
50
If I remember right then you need to remove the corpses manually to prevent it from lagg...

Just do this anyways:

event - A unit dies
condition - A creep
Action - Wait(35 seconds)
RemoveUnit(Triggering Unit)
 

Gtam

Lerning how to write and read!! Yeah.
Reaction score
164
No. Its fine to set it in the object editor. No trigger needed
 

HL.Clockwork

New Member
Reaction score
5
Now i have redone 4 trigger and merged em into one.

It would be very nice if some could have a look and check it for leaks and some optimization.

Trigger:
  • unit dies event
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is an illusion) Equal to False
      • Or - Any (Conditions) are true
        • Conditions
          • (Owner of (Dying unit)) Equal to Player 9 (Gray)
          • (Owner of (Dying unit)) Equal to Player 10 (Light Blue)
          • (Owner of (Dying unit)) Equal to Player 11 (Dark Green)
          • (Owner of (Dying unit)) Equal to Player 12 (Brown)
    • Actions
      • -------- Unit Type --------
      • For each (Integer A) from (roundcount - 4) to (roundcount + 1), do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Triggering unit)) Equal to wave[(Integer A)]
            • Then - Actions
              • Set unitcount[(Integer A)] = (unitcount[(Integer A)] - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • unitcount[(Integer A)] Equal to 0
                • Then - Actions
                  • Set round_completed[(Integer A)] = True
                  • Set fivedec = (fivedec + 1)
                  • Trigger - Run moregold &lt;gen&gt; (checking conditions)
                  • For each (Integer B) from 1 to 4, do (Actions)
                    • Loop - Actions
                      • Game - Display to (Player((Integer B))), at offset (0.00, 0.00) the text: ((String((roundgold + fivedec))) + ( bonus gold for completing round: + ((Name of (Triggering unit)) + s)))
                      • Player - Add (roundgold + fivedec) to (Player((Integer B))) Current gold
                • Else - Actions
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Triggering unit)) Equal to heros[(Integer A)]
            • Then - Actions
              • Set hero_count[(Integer A)] = (hero_count[(Integer A)] - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • hero_count[(Integer A)] Equal to 0
                • Then - Actions
                  • For each (Integer B) from 1 to 4, do (Actions)
                    • Loop - Actions
                      • Custom script: call RemoveLocation(udg_hero_orders_9[bj_forLoopAIndex])
                      • Custom script: call RemoveLocation(udg_hero_orders_10[bj_forLoopAIndex])
                      • Custom script: call RemoveLocation(udg_hero_orders_11[bj_forLoopAIndex])
                      • Custom script: call RemoveLocation(udg_hero_orders_12[bj_forLoopAIndex])
                      • Game - Display to (Player((Integer B))), at offset (0.00, 0.00) the text: (One + ( bonus Mojo for killing all heros: + ((Name of (Triggering unit)) + s)))
                      • Player - Add 1 to (Player((Integer B))) Current lumber
                • Else - Actions
            • Else - Actions
      • -------- Player 1 --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Killing unit)) Equal to Player 1 (Red)
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Dying unit) is A Hero) Equal to True
            • Then - Actions
              • Set hero_kills[1] = (hero_kills[1] + 1)
            • Else - Actions
          • Set killcount[1] = (killcount[1] + 1)
          • Set total_gold[1] = (total_gold[1] + (Supply provided by (Dying unit)))
        • Else - Actions
      • -------- Player 2 --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Killing unit)) Equal to Player 2 (Blue)
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Dying unit) is A Hero) Equal to True
            • Then - Actions
              • Set hero_kills[2] = (hero_kills[2] + 1)
            • Else - Actions
          • Set killcount[2] = (killcount[2] + 1)
          • Set total_gold[2] = (total_gold[2] + (Supply provided by (Dying unit)))
        • Else - Actions
      • -------- Player 3 --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Killing unit)) Equal to Player 3 (Teal)
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Dying unit) is A Hero) Equal to True
            • Then - Actions
              • Set hero_kills[3] = (hero_kills[3] + 1)
            • Else - Actions
          • Set killcount[3] = (killcount[3] + 1)
          • Set total_gold[3] = (total_gold[3] + (Supply provided by (Dying unit)))
        • Else - Actions
      • -------- Player 4 --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Killing unit)) Equal to Player 4 (Purple)
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Dying unit) is A Hero) Equal to True
            • Then - Actions
              • Set hero_kills[4] = (hero_kills[4] + 1)
            • Else - Actions
          • Set killcount[4] = (killcount[4] + 1)
          • Set total_gold[4] = (total_gold[4] + (Supply provided by (Dying unit)))
        • Else - Actions
      • -------- NEXT Round --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • round_started[roundcount] Equal to False
          • unitcount[(roundcount - 1)] Less than or equal to 10
        • Then - Actions
          • Countdown Timer - Start td_timer as a One-shot timer that will expire in 15.00 seconds
          • Countdown Timer - Change the title of (Last created timer window) to (Round: + ((String(roundcount)) + in: ))
          • Set round_started[roundcount] = True
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • firstroundflag Equal to True
        • Then - Actions
          • Set firstroundflag = False
        • Else - Actions
          • Do nothing
      • -------- score bord update --------
      • For each (Integer A) from 2 to 5, do (Actions)
        • Loop - Actions
          • Multiboard - Set the text for (Last created multiboard) item in column 2, row (Integer A) to (String(killcount[((Integer A) - 1)]))
          • Multiboard - Set the text for (Last created multiboard) item in column 3, row (Integer A) to (String(hero_kills[((Integer A) - 1)]))
          • Multiboard - Set the text for (Last created multiboard) item in column 4, row (Integer A) to (String(total_gold[((Integer A) - 1)]))
      • -------- Unit Remove --------
      • Unit - Remove (Triggering unit) from the game
 
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