• 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.

[Trigger] Where does this trigger leak?

Status
Not open for further replies.
Level 8
Joined
Jan 16, 2008
Messages
156
If this trigger doesn't leak, is there anything other than trigger leaks that could cause a delay that effects about half the games of my map played, where a delay starts and gets worse and worse as it goes on (sometimes leading to a 20 second order delay, even though there is no b-net typing delay)

  • Alliance Item Point Divider
    • Events
      • Time - Every 20.00 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 4, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Player((Integer A))) slot status) Not equal to Is playing
            • Then - Actions
              • Set AllianceGoldDivider1 = (((Player((Integer A))) Current gold) / (Number of players in (All players matching ((((Matching player) slot status) Equal to Is playing) and (((Matching player) is an ally of (Player((Integer A)))) Equal to True)))))
              • Player Group - Pick every player in (All players) and do (Actions)
                • Loop - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ((Picked player) slot status) Equal to Is playing
                      • ((Picked player) is an ally of (Player((Integer A)))) Equal to True
                    • Then - Actions
                      • Player - Add AllianceGoldDivider1 to (Picked player) Current gold
                    • Else - Actions
              • Player - Set (Player((Integer A))) Current gold to 0
            • Else - Actions
      • For each (Integer A) from 6 to 9, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Player((Integer A))) slot status) Not equal to Is playing
            • Then - Actions
              • Set AllianceGoldDivider2 = (((Player((Integer A))) Current gold) / (Number of players in (All players matching ((((Matching player) slot status) Equal to Is playing) and (((Matching player) is an ally of (Player((Integer A)))) Equal to True)))))
              • Player Group - Pick every player in (All players) and do (Actions)
                • Loop - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ((Picked player) slot status) Equal to Is playing
                      • ((Picked player) is an ally of (Player((Integer A)))) Equal to True
                    • Then - Actions
                      • Player - Add AllianceGoldDivider2 to (Picked player) Current gold
                    • Else - Actions
              • Player - Set (Player((Integer A))) Current gold to 0
            • Else - Actions
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
2 force leaks.

Set AllianceGoldDivider1 = (((Player((Integer A))) Current gold) / (Number of players in (All players matching ((((Matching player) slot status) Equal to Is playing) and (((Matching player) is an ally of (Player((Integer A)))) Equal to True)))))
Set AllianceGoldDivider2 = (((Player((Integer A))) Current gold) / (Number of players in (All players matching ((((Matching player) slot status) Equal to Is playing) and (((Matching player) is an ally of (Player((Integer A)))) Equal to True)))))


All players matching returns a force which you do not destroy and thus it leaks.

Leaks do not cause order delays, they cause increased recource requirements for the same preformance in the map to be achieved. I would generally say it is your internet connection which is lagging and not the leaks causing orders to be delayed. If your map has a lot of net traffic, such delays are to be expected so make sure you use triggers that cause net traffic as little as possiable.
 
Level 8
Joined
Jan 16, 2008
Messages
156
All players matching returns a force which you do not destroy and thus it leaks.

Leaks do not cause order delays, they cause increased recource requirements for the same preformance in the map to be achieved. I would generally say it is your internet connection which is lagging and not the leaks causing orders to be delayed. If your map has a lot of net traffic, such delays are to be expected so make sure you use triggers that cause net traffic as little as possiable.

Well my internet connection is fine. If I type a message to someone ingame it works run, and there is no slowdown issues at all with putting it up or anything like it. I can scroll at speed too. The memory usage does seem to up, the game starts at abotyt 300,000k and goes up to about 480,000k when I see delays.

The problem is giving orders, but if leaks dont cause that, what would?

Which triggers can cause net traffic? Could I still type things at normal speeds if my triggers cause net traffic? It is a 12 player map.

My map has quite a few point leaks, but they were present in all my older versions and it never had an issue with them... this is new recent issue.
 
Status
Not open for further replies.
Top