• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[General] Whe is my map playing in 1-2 FPS for other players?

Status
Not open for further replies.

Chaosy

Tutorial Reviewer
Level 41
Joined
Jun 9, 2011
Messages
13,239
Depend on the configuration system and Warcraft 3 options , if you are using different spell systems done with triggers that might cause lag.

Not lag for one player only.
Leaks and the like would cause lag for all players.
Though the player with the best hardware will lag the least.
 
Level 11
Joined
Oct 9, 2015
Messages
721
I've cleaned all the leaks I could in the hive's leak tool, however there were a very few I could't find how to clean, and the problem seems to persist. Some of my friends are able to play it normally, but one of them get's really low FPS while playing it. When I say low FPS I mean he can't even walk!

Thanks in advice, guys!
 
Level 11
Joined
Oct 9, 2015
Messages
721
You mean filesize? if not how can I check for the number of destructables & doodlads? Do you want me to post the map itself so you can take a look? If so, how can I upload it here in the thread ?

Sorry for my complications, I just want to get things clear and save you guys time!

Edit (in case that's what your're asking): Full 64x64 (playable: 52x52)
there are nearly 1350 destructables & doodlads.
 
Level 13
Joined
Jan 2, 2016
Messages
978
When posting a replay (to this thread), next to "Post Quick Reply" you will see "Go Advanced". When you click the latter - you will get a new reply window (with more tools above it). Click on the paperclip button and upload your map there.
But yeah... file size could give some knowledge as well :p
 
Level 11
Joined
Oct 9, 2015
Messages
721
Here's the map!

I can translate the trigger names and other stuff for better compreenssion if you wish!

((I can translate trigger names and other informations if you wish.))

Sorry for double posting, I tought I had pressed the EDIT button :(
 

Attachments

  • batalha campal.w3x
    921.3 KB · Views: 30
Last edited by a moderator:
Level 13
Joined
Jan 2, 2016
Messages
978
Okay, here is something, that's REALLY bothering:
You have several triggers that run every 0.01 seconds. Make them run AT LEAST every 0.03 seconds (that's the "sane" minimum). Personally I use 0.05-0.06 for my more responsible triggers, and 0.1 for my not-so responsible ones.
In "mudando cores glow" - you have a unit group leak.
remove it by adding "set bj_wantDestroyGroup = true" before creating the group.
At the moment you are leaking 1200 !! Units groups per second!!

That's how it should look:
  • mudando cores glow
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Custom script: set bj_wantDestroyGroup = true
          • Unit Group - Pick every unit in (Units owned by (Player((Integer A)))) and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Owner of (Picked unit)) is an ally of Player 11 (Dark Green)) Equal to True
                  • (Unit-type of (Picked unit)) Not equal to Cavalo Pesado
                  • Or - Any (Conditions) are true
                    • Conditions
                      • (Unit-type of (Picked unit)) Equal to Humano
                      • (Unit-type of (Picked unit)) Equal to Humano (armadura media)
                      • (Unit-type of (Picked unit)) Equal to Humano (armadura pesada)
                • Then - Actions
                  • Unit - Change color of (Picked unit) to Blue
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Owner of (Picked unit)) is an ally of Player 12 (Brown)) Equal to True
                  • (Unit-type of (Picked unit)) Not equal to Cavalo Pesado
                  • Or - Any (Conditions) are true
                    • Conditions
                      • (Unit-type of (Picked unit)) Equal to Humano
                      • (Unit-type of (Picked unit)) Equal to Humano (armadura media)
                      • (Unit-type of (Picked unit)) Equal to Humano (armadura pesada)
                • Then - Actions
                  • Unit - Change color of (Picked unit) to Red
                • Else - Actions
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,287
Periodic events and timer events are probably of similar performance.

When using periodic events it is important you disable the trigger when it is not required. For example if you have an ability which moves a unit at a period of 0.01-0.03 then when no units are affected by the ability the trigger should be turned off to save resources.

Do note that pausing a periodic timer removes its periodic flag. Resuming a paused periodic timer results in it becoming one-shot with the remaining period at which you paused it. This also applies when loading a save of the map, all periodic timers become one-shot on load. When resuming such a timer you have to restart it, which can result in some inaccuracies. You could also chain one-shot timers together by restarting them before their handler returns but that adds some extra overhead. Periodic trigger events do not suffer from this problem (might have others I am unaware of) meaning there is some usefulness to them.
 
Level 11
Joined
Oct 9, 2015
Messages
721
Here's the mess haha
When I turned this and another one off (camera trigger, also periodic) the performance seemed to increase


  • Movement and turning
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • DownTrue[(Integer A)] Equal to False
            • Then - Actions
              • Set Speed[(Integer A)] = 0.00
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • DownTrue[(Integer A)] Equal to True
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Unit[(Integer A)] has buff Defesa ) Equal to True
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Mana of Unit[(Integer A)]) Less than 25.00
                      • (Unit-type of Unit[(Integer A)]) Equal to Humano
                      • Mounted[(Integer A)] Equal to False
                    • Then - Actions
                      • Set Speed[(Integer A)] = -1.50
                      • Set AnimationSpeed[(Integer A)] = -1.00
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Mana of Unit[(Integer A)]) Less than 25.00
                      • Mounted[(Integer A)] Equal to False
                      • (Unit-type of Unit[(Integer A)]) Equal to Humano (armadura media)
                    • Then - Actions
                      • Set Speed[(Integer A)] = -1.25
                      • Set AnimationSpeed[(Integer A)] = -0.75
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Mana of Unit[(Integer A)]) Less than 25.00
                      • Mounted[(Integer A)] Equal to False
                      • (Unit-type of Unit[(Integer A)]) Equal to Humano (armadura pesada)
                    • Then - Actions
                      • Set Speed[(Integer A)] = -1.00
                      • Set AnimationSpeed[(Integer A)] = -0.50
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Mana of Unit[(Integer A)]) Greater than or equal to 25.00
                      • Mounted[(Integer A)] Equal to False
                      • (Unit-type of Unit[(Integer A)]) Equal to Humano
                    • Then - Actions
                      • Set Speed[(Integer A)] = -2.00
                      • Set AnimationSpeed[(Integer A)] = -1.50
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Mana of Unit[(Integer A)]) Greater than or equal to 25.00
                      • Mounted[(Integer A)] Equal to False
                      • (Unit-type of Unit[(Integer A)]) Equal to Humano (armadura media)
                    • Then - Actions
                      • Set Speed[(Integer A)] = -1.75
                      • Set AnimationSpeed[(Integer A)] = -1.25
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Mana of Unit[(Integer A)]) Greater than or equal to 25.00
                      • Mounted[(Integer A)] Equal to False
                      • (Unit-type of Unit[(Integer A)]) Equal to Humano (armadura pesada)
                    • Then - Actions
                      • Set Speed[(Integer A)] = -1.50
                      • Set AnimationSpeed[(Integer A)] = -1.00
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Mounted[(Integer A)] Equal to True
                    • Then - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Unit-type of UnitHorse[(Integer A)]) Equal to Cavalo Leve
                        • Then - Actions
                          • Set Speed[(Integer A)] = -3.00
                          • Set AnimationSpeed[(Integer A)] = -2.00
                        • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Unit-type of UnitHorse[(Integer A)]) Equal to Cavalo Medio
                        • Then - Actions
                          • Set Speed[(Integer A)] = -2.50
                          • Set AnimationSpeed[(Integer A)] = -2.00
                        • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Unit-type of UnitHorse[(Integer A)]) Equal to Cavalo Pesado
                        • Then - Actions
                          • Set Speed[(Integer A)] = -2.00
                          • Set AnimationSpeed[(Integer A)] = -2.00
                        • Else - Actions
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Or - Any (Conditions) are true
                        • Conditions
                          • (Unit[(Integer A)] has an item of type Espada de Bronze) Equal to True
                          • (Unit[(Integer A)] has an item of type Martelo de Bronze) Equal to True
                          • (Unit[(Integer A)] has an item of type Espada Larga de Bronze) Equal to True
                          • (Unit[(Integer A)] has an item of type Lança) Equal to True
                          • (Unit[(Integer A)] has an item of type Marreta de Bronze) Equal to True
                          • (Unit[(Integer A)] has an item of type Broquel de Bronze) Equal to True
                          • (Unit[(Integer A)] has an item of type Escudo de Bronze) Equal to True
                    • Then - Actions
                      • Unit - Remove Ataque from Unit[(Integer A)]
                      • Unit - Remove Ataque Pesado from Unit[(Integer A)]
                      • Unit - Remove Golpear com Escudo from Unit[(Integer A)]
                    • Else - Actions
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Unit[(Integer A)] has buff Defesa ) Equal to False
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Mana of Unit[(Integer A)]) Less than 25.00
                      • Mounted[(Integer A)] Equal to False
                      • (Unit-type of Unit[(Integer A)]) Equal to Humano
                    • Then - Actions
                      • Set Speed[(Integer A)] = -2.00
                      • Set AnimationSpeed[(Integer A)] = -1.50
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Mana of Unit[(Integer A)]) Less than 25.00
                      • Mounted[(Integer A)] Equal to False
                      • (Unit-type of Unit[(Integer A)]) Equal to Humano (armadura media)
                    • Then - Actions
                      • Set Speed[(Integer A)] = -1.50
                      • Set AnimationSpeed[(Integer A)] = -1.00
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Mana of Unit[(Integer A)]) Less than 25.00
                      • Mounted[(Integer A)] Equal to False
                      • (Unit-type of Unit[(Integer A)]) Equal to Humano (armadura pesada)
                    • Then - Actions
                      • Set Speed[(Integer A)] = -1.00
                      • Set AnimationSpeed[(Integer A)] = -0.50
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Mana of Unit[(Integer A)]) Greater than or equal to 25.00
                      • Mounted[(Integer A)] Equal to False
                      • (Unit-type of Unit[(Integer A)]) Equal to Humano
                    • Then - Actions
                      • Set Speed[(Integer A)] = -3.00
                      • Set AnimationSpeed[(Integer A)] = -2.00
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Mana of Unit[(Integer A)]) Greater than or equal to 25.00
                      • Mounted[(Integer A)] Equal to False
                      • (Unit-type of Unit[(Integer A)]) Equal to Humano (armadura media)
                    • Then - Actions
                      • Set Speed[(Integer A)] = -2.50
                      • Set AnimationSpeed[(Integer A)] = -1.50
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Mana of Unit[(Integer A)]) Greater than or equal to 25.00
                      • Mounted[(Integer A)] Equal to False
                      • (Unit-type of Unit[(Integer A)]) Equal to Humano (armadura pesada)
                    • Then - Actions
                      • Set Speed[(Integer A)] = -2.00
                      • Set AnimationSpeed[(Integer A)] = -1.00
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Mounted[(Integer A)] Equal to True
                    • Then - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Unit-type of UnitHorse[(Integer A)]) Equal to Cavalo Leve
                        • Then - Actions
                          • Set Speed[(Integer A)] = -3.00
                          • Set AnimationSpeed[(Integer A)] = -2.00
                        • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Unit-type of UnitHorse[(Integer A)]) Equal to Cavalo Medio
                        • Then - Actions
                          • Set Speed[(Integer A)] = -2.50
                          • Set AnimationSpeed[(Integer A)] = -2.00
                        • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Unit-type of UnitHorse[(Integer A)]) Equal to Cavalo Pesado
                        • Then - Actions
                          • Set Speed[(Integer A)] = -2.00
                          • Set AnimationSpeed[(Integer A)] = -2.00
                        • Else - Actions
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Or - Any (Conditions) are true
                        • Conditions
                          • (Unit[(Integer A)] has an item of type Espada de Bronze) Equal to True
                          • (Unit[(Integer A)] has an item of type Martelo de Bronze) Equal to True
                          • (Unit[(Integer A)] has an item of type Espada Larga de Bronze) Equal to True
                          • (Unit[(Integer A)] has an item of type Lança) Equal to True
                          • (Unit[(Integer A)] has an item of type Marreta de Bronze) Equal to True
                          • (Unit[(Integer A)] has an item of type Broquel de Bronze) Equal to True
                          • (Unit[(Integer A)] has an item of type Escudo de Bronze) Equal to True
                    • Then - Actions
                      • Unit - Remove Ataque from Unit[(Integer A)]
                      • Unit - Remove Ataque Pesado from Unit[(Integer A)]
                      • Unit - Remove Golpear com Escudo from Unit[(Integer A)]
                    • Else - Actions
                • Else - Actions
              • Set Loc1 = (Position of Unit[(Integer A)])
              • Set Location[(Integer A)] = (Loc1 offset by Speed[(Integer A)] towards (Facing of Unit[(Integer A)]) degrees)
              • Unit - Move Unit[(Integer A)] instantly to Location[(Integer A)]
              • Unit - Make Unit[(Integer A)] face Angle[(Integer A)] over 0.00 seconds
              • Custom script: call RemoveLocation(udg_Location[GetForLoopIndexA()])
              • Custom script: call RemoveLocation(udg_Loc1)
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • UpTrue[(Integer A)] Equal to False
            • Then - Actions
              • Set Speed[(Integer A)] = 0.00
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • UpTrue[(Integer A)] Equal to True
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Unit[(Integer A)] has buff Defesa ) Equal to True
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Mana of Unit[(Integer A)]) Less than 25.00
                      • Mounted[(Integer A)] Equal to False
                      • (Unit-type of Unit[(Integer A)]) Equal to Humano
                    • Then - Actions
                      • Set Speed[(Integer A)] = 1.50
                      • Set AnimationSpeed[(Integer A)] = 1.00
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Mana of Unit[(Integer A)]) Less than 25.00
                      • Mounted[(Integer A)] Equal to False
                      • (Unit-type of Unit[(Integer A)]) Equal to Humano (armadura media)
                    • Then - Actions
                      • Set Speed[(Integer A)] = 1.25
                      • Set AnimationSpeed[(Integer A)] = 0.75
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Mana of Unit[(Integer A)]) Less than 25.00
                      • Mounted[(Integer A)] Equal to False
                      • (Unit-type of Unit[(Integer A)]) Equal to Humano (armadura pesada)
                    • Then - Actions
                      • Set Speed[(Integer A)] = 1.00
                      • Set AnimationSpeed[(Integer A)] = 0.50
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Mana of Unit[(Integer A)]) Greater than or equal to 25.00
                      • Mounted[(Integer A)] Equal to False
                      • (Unit-type of Unit[(Integer A)]) Equal to Humano
                    • Then - Actions
                      • Set Speed[(Integer A)] = 2.00
                      • Set AnimationSpeed[(Integer A)] = 1.50
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Mana of Unit[(Integer A)]) Greater than or equal to 25.00
                      • Mounted[(Integer A)] Equal to False
                      • (Unit-type of Unit[(Integer A)]) Equal to Humano (armadura media)
                    • Then - Actions
                      • Set Speed[(Integer A)] = 1.75
                      • Set AnimationSpeed[(Integer A)] = 1.25
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Mana of Unit[(Integer A)]) Greater than or equal to 25.00
                      • Mounted[(Integer A)] Equal to False
                      • (Unit-type of Unit[(Integer A)]) Equal to Humano (armadura pesada)
                    • Then - Actions
                      • Set Speed[(Integer A)] = 1.50
                      • Set AnimationSpeed[(Integer A)] = 1.00
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Mounted[(Integer A)] Equal to True
                    • Then - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Unit-type of UnitHorse[(Integer A)]) Equal to Cavalo Leve
                        • Then - Actions
                          • Set Speed[(Integer A)] = 6.00
                          • Set AnimationSpeed[(Integer A)] = 2.00
                        • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Unit-type of UnitHorse[(Integer A)]) Equal to Cavalo Medio
                        • Then - Actions
                          • Set Speed[(Integer A)] = 5.00
                          • Set AnimationSpeed[(Integer A)] = 2.00
                        • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Unit-type of UnitHorse[(Integer A)]) Equal to Cavalo Pesado
                        • Then - Actions
                          • Set Speed[(Integer A)] = 4.00
                          • Set AnimationSpeed[(Integer A)] = 2.00
                        • Else - Actions
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Or - Any (Conditions) are true
                        • Conditions
                          • (Unit[(Integer A)] has an item of type Espada de Bronze) Equal to True
                          • (Unit[(Integer A)] has an item of type Martelo de Bronze) Equal to True
                          • (Unit[(Integer A)] has an item of type Lança) Equal to True
                    • Then - Actions
                      • Unit - Add Ataque to Unit[(Integer A)]
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Or - Any (Conditions) are true
                        • Conditions
                          • (Unit[(Integer A)] has an item of type Broquel de Bronze) Equal to True
                          • (Unit[(Integer A)] has an item of type Escudo de Bronze) Equal to True
                      • (Unit[(Integer A)] has buff Defesa ) Equal to True
                    • Then - Actions
                      • Unit - Add Golpear com Escudo to Unit[(Integer A)]
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Or - Any (Conditions) are true
                        • Conditions
                          • (Unit[(Integer A)] has an item of type Espada Larga de Bronze) Equal to True
                          • (Unit[(Integer A)] has an item of type Marreta de Bronze) Equal to True
                    • Then - Actions
                      • Unit - Add Ataque Pesado to Unit[(Integer A)]
                    • Else - Actions
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Unit[(Integer A)] has buff Defesa ) Equal to False
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Mana of Unit[(Integer A)]) Less than 25.00
                      • Mounted[(Integer A)] Equal to False
                      • (Unit-type of Unit[(Integer A)]) Equal to Humano
                    • Then - Actions
                      • Set Speed[(Integer A)] = 2.00
                      • Set AnimationSpeed[(Integer A)] = 1.50
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Mana of Unit[(Integer A)]) Less than 25.00
                      • Mounted[(Integer A)] Equal to False
                      • (Unit-type of Unit[(Integer A)]) Equal to Humano (armadura media)
                    • Then - Actions
                      • Set Speed[(Integer A)] = 1.50
                      • Set AnimationSpeed[(Integer A)] = 1.00
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Mana of Unit[(Integer A)]) Less than 25.00
                      • Mounted[(Integer A)] Equal to False
                      • (Unit-type of Unit[(Integer A)]) Equal to Humano (armadura pesada)
                    • Then - Actions
                      • Set Speed[(Integer A)] = 1.00
                      • Set AnimationSpeed[(Integer A)] = 0.50
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Mana of Unit[(Integer A)]) Greater than or equal to 25.00
                      • Mounted[(Integer A)] Equal to False
                      • (Unit-type of Unit[(Integer A)]) Equal to Humano
                    • Then - Actions
                      • Set Speed[(Integer A)] = 3.00
                      • Set AnimationSpeed[(Integer A)] = 2.00
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Mana of Unit[(Integer A)]) Greater than or equal to 25.00
                      • Mounted[(Integer A)] Equal to False
                      • (Unit-type of Unit[(Integer A)]) Equal to Humano (armadura media)
                    • Then - Actions
                      • Set Speed[(Integer A)] = 2.50
                      • Set AnimationSpeed[(Integer A)] = 1.50
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Mana of Unit[(Integer A)]) Greater than or equal to 25.00
                      • Mounted[(Integer A)] Equal to False
                      • (Unit-type of Unit[(Integer A)]) Equal to Humano (armadura pesada)
                    • Then - Actions
                      • Set Speed[(Integer A)] = 2.00
                      • Set AnimationSpeed[(Integer A)] = 1.00
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Mounted[(Integer A)] Equal to True
                    • Then - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Unit-type of UnitHorse[(Integer A)]) Equal to Cavalo Leve
                        • Then - Actions
                          • Set Speed[(Integer A)] = 6.00
                          • Set AnimationSpeed[(Integer A)] = 2.00
                        • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Unit-type of UnitHorse[(Integer A)]) Equal to Cavalo Medio
                        • Then - Actions
                          • Set Speed[(Integer A)] = 5.00
                          • Set AnimationSpeed[(Integer A)] = 2.00
                        • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Unit-type of UnitHorse[(Integer A)]) Equal to Cavalo Pesado
                        • Then - Actions
                          • Set Speed[(Integer A)] = 4.00
                          • Set AnimationSpeed[(Integer A)] = 2.00
                        • Else - Actions
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Or - Any (Conditions) are true
                        • Conditions
                          • (Unit[(Integer A)] has an item of type Espada de Bronze) Equal to True
                          • (Unit[(Integer A)] has an item of type Martelo de Bronze) Equal to True
                          • (Unit[(Integer A)] has an item of type Lança) Equal to True
                    • Then - Actions
                      • Unit - Add Ataque to Unit[(Integer A)]
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Unit[(Integer A)] has an item of type Broquel de Bronze) Equal to True
                          • (Unit[(Integer A)] has buff Defesa ) Equal to True
                        • Then - Actions
                          • Unit - Add Golpear com Escudo to Unit[(Integer A)]
                        • Else - Actions
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Or - Any (Conditions) are true
                        • Conditions
                          • (Unit[(Integer A)] has an item of type Espada Larga de Bronze) Equal to True
                          • (Unit[(Integer A)] has an item of type Marreta de Bronze) Equal to True
                    • Then - Actions
                      • Unit - Add Ataque Pesado to Unit[(Integer A)]
                    • Else - Actions
                • Else - Actions
              • Set Loc1 = (Position of Unit[(Integer A)])
              • Set Location[(Integer A)] = (Loc1 offset by Speed[(Integer A)] towards (Facing of Unit[(Integer A)]) degrees)
              • Unit - Move Unit[(Integer A)] instantly to Location[(Integer A)]
              • Custom script: call RemoveLocation(udg_Location[GetForLoopIndexA()])
              • Custom script: call RemoveLocation(udg_Loc1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • UpTrue[(Integer A)] Equal to True
                • Then - Actions
                  • Unit - Make Unit[(Integer A)] face Angle[(Integer A)] over 0.00 seconds
                • Else - Actions
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • LeftTrue[(Integer A)] Equal to True
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Mounted[(Integer A)] Equal to True
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Unit-type of UnitHorse[(Integer A)]) Equal to Cavalo Leve
                    • Then - Actions
                      • Set Angle[(Integer A)] = (Angle[(Integer A)] + 1.00)
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Unit-type of UnitHorse[(Integer A)]) Equal to Cavalo Medio
                    • Then - Actions
                      • Set Angle[(Integer A)] = (Angle[(Integer A)] + 0.75)
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Unit-type of UnitHorse[(Integer A)]) Equal to Cavalo Pesado
                    • Then - Actions
                      • Set Angle[(Integer A)] = (Angle[(Integer A)] + 0.50)
                    • Else - Actions
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Mounted[(Integer A)] Equal to False
                • Then - Actions
                  • Set Angle[(Integer A)] = (Angle[(Integer A)] + 1.00)
                • Else - Actions
              • Camera - Set (Owner of Unit[(Player number of (Player((Integer A))))])'s camera Rotation to Angle[(Integer A)] over 0.00 seconds
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • NoCamera[(Integer A)] Equal to False
                • Then - Actions
                  • Unit - Make Unit[(Integer A)] face Angle[(Integer A)] over 0.00 seconds
                • Else - Actions
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • RightTrue[(Integer A)] Equal to True
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Mounted[(Integer A)] Equal to True
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Unit-type of UnitHorse[(Integer A)]) Equal to Cavalo Leve
                    • Then - Actions
                      • Set Angle[(Integer A)] = (Angle[(Integer A)] - 1.00)
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Unit-type of UnitHorse[(Integer A)]) Equal to Cavalo Medio
                    • Then - Actions
                      • Set Angle[(Integer A)] = (Angle[(Integer A)] - 0.75)
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Unit-type of UnitHorse[(Integer A)]) Equal to Cavalo Pesado
                    • Then - Actions
                      • Set Angle[(Integer A)] = (Angle[(Integer A)] - 0.50)
                    • Else - Actions
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Mounted[(Integer A)] Equal to False
                • Then - Actions
                  • Set Angle[(Integer A)] = (Angle[(Integer A)] - 1.00)
                • Else - Actions
              • Camera - Set (Owner of Unit[(Player number of (Player((Integer A))))])'s camera Rotation to Angle[(Integer A)] over 0.00 seconds
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • NoCamera[(Integer A)] Equal to False
                • Then - Actions
                  • Unit - Make Unit[(Integer A)] face Angle[(Integer A)] over 0.00 seconds
                • Else - Actions
            • Else - Actions
 
Level 30
Joined
Feb 18, 2014
Messages
3,623
That ^^ must be the longest trigger I've ever seen in my entire life!
On-topic : Why setting Speed(IntergerA) to another value on each step while you can make things easly for you by adding + another value to that interger.
 
Level 11
Joined
Oct 9, 2015
Messages
721
I don't think I understood everything but values need to be different. if (UpTrue = True) then the value needs to be positive, if (DownTrue = True) the value needs to be negative. Plus each type of unit or condition needs it's own Speed. For example the unit "Humano" is a normal human with no armor, "Humano Armadura Pesada" is a heavly armored human, so it's speed must be lower than of an normal human with no armor.

Is that what you were reffering for ?

PS: can this big trigger be what are causing the performance issue? It doesn't seem to have any leak.
 
Level 16
Joined
Mar 27, 2011
Messages
1,349
Bear 369 is wrong about not needing to turn off the trigger. Wherever possible, increase the periodic timer interval. The higher, the less resources it will take. If the periodic running trigger is no longer needed at a given time, turn it off until it is needed again, regardless of the timer interval.
 
Status
Not open for further replies.
Top