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

[Crash] Map disconnection problem

Status
Not open for further replies.
Level 9
Joined
Jun 5, 2011
Messages
788
I have a big problem... i have been working for the last months on a map and just a few days ago it happened that i finished the beta version, so basically it's fully playable but still needs more improvements to have quite a better gameplay.

Unfortunately when i tried to play it with other people around (some of my friends and others) i realised that it had a major bug. The map somehow kicks all players from teams 2 and 3 (it has 3 teams) and gives the winning dialog to team 1. I am 100% sure that i didn't include any type of trigger or data that may make a player get disconnected... but i just don't know now... it's too weird.

All the players in team 2 and 3 get the "you were disconnected" message, like the host would end the game or something... but it's just strange.
Can anyone help me or tell me if they had a similar problem and found a solution?

Thanks in advance!

EDIT: I've just tried a few things and discovered that by disabling my initialization trigger the map doesn't disconnect players anymore... so i think the problem comes from here. If anyone can see what's wrong then please tell me:

  • Initialize
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Game - Set the time of day to 24.00
      • Game - Set time of day speed to 0.00% of the default speed
      • -------- ----- --------
      • Floating Text - Create floating text that reads Knight at (Center of pick knight <gen>) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 30.00% transparency
      • Floating Text - Create floating text that reads Scout at (Center of pick scout <gen>) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 30.00% transparency
      • Floating Text - Create floating text that reads Mage at (Center of pick mage <gen>) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 30.00% transparency
      • Floating Text - Create floating text that reads Priest at (Center of pick priest <gen>) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 30.00% transparency
      • Floating Text - Create floating text that reads Rogue at (Center of pick rogue <gen>) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 30.00% transparency
      • Floating Text - Create floating text that reads Hunter at (Center of pick hunter <gen>) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 30.00% transparency
      • Floating Text - Create floating text that reads Stalker at (Center of pick stalker <gen>) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 30.00% transparency
      • Floating Text - Create floating text that reads Sentinel at (Center of pick sentinel <gen>) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 30.00% transparency
      • Floating Text - Create floating text that reads Shapeshifter at (Center of pick shapeshifter <gen>) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 30.00% transparency
      • Floating Text - Create floating text that reads Shadowmancer at (Center of pick shadowmancer <gen>) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 30.00% transparency
      • -------- ----- --------
      • Player - Set name of Player 12 (Brown) to Animals
      • -------- ----- --------
      • For each (Integer A) from 1 to 11, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Player((Integer A))) slot status) Equal to Is playing
            • Then - Actions
              • Player Group - Add (Player((Integer A))) to on_players
              • Unit Group - Pick every unit in (Units owned by (Player((Integer A))) of type Choice) and do (Camera - Lock camera target for (Player((Integer A))) to (Picked unit), offset by (0.00, 0.00) using Default rotation)
              • Selection - Select (Units owned by (Player((Integer A))) of type Choice) for (Player((Integer A)))
              • Trigger - Add to Texts Descriptions <gen> the event (Player - (Player((Integer A))) Selects a unit)
              • Trigger - Add to Player leaves <gen> the event (Player - (Player((Integer A))) leaves the game)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Integer A) Less than or equal to 5
                • Then - Actions
                  • Player Group - Add (Player((Integer A))) to team1
                  • Set integer_team1 = (integer_team1 + 1)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Integer A) Less than or equal to 10
                    • Then - Actions
                      • Player Group - Add (Player((Integer A))) to team2
                      • Set integer_team2 = (integer_team2 + 1)
                    • Else - Actions
                      • Player Group - Add (Player((Integer A))) to team3
                      • Set integer_team3 = (integer_team3 + 1)
            • Else - Actions
              • Unit Group - Pick every unit in (Units owned by (Player((Integer A)))) and do (Unit - Remove (Picked unit) from the game)
      • Trigger - Run Basic items spawn <gen> (checking conditions)
      • Trigger - Run Basic items spawn <gen> (checking conditions)
      • Trigger - Run Basic items spawn <gen> (checking conditions)
      • Trigger - Run secondary items spawn <gen> (checking conditions)
      • Trigger - Run Animals spawn1 <gen> (checking conditions)
      • Trigger - Run Starting items <gen> (checking conditions)
      • Trigger - Run Books <gen> (checking conditions)
      • Trigger - Turn off (This trigger)
      • Unit - Remove Hide from Rogue 0021 <gen>
      • Destructible - Pick every destructible in (Entire map) and do (Actions)
        • Loop - Actions
          • If ((Destructible-type of (Picked destructible)) Equal to Snowy Tree Wall (custom)) then do (Trigger - Add to Trees <gen> the event (Destructible - (Picked destructible) dies)) else do (Do nothing)
      • Game - Display to on_players for 15.00 seconds the text: Greetings... Becaus...
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (integer_team2 Equal to 0) and (integer_team3 Equal to 0)
        • Then - Actions
          • Set testmode = True
          • Game - Display to on_players the text: TEST MODE IS ACTIVE...
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (integer_team1 Equal to 0) and (integer_team3 Equal to 0)
            • Then - Actions
              • Set testmode = True
              • Game - Display to on_players the text: TEST MODE IS ACTIVE...
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (integer_team2 Equal to 0) and (integer_team1 Equal to 0)
                • Then - Actions
                  • Set testmode = True
                  • Game - Display to on_players the text: TEST MODE IS ACTIVE...
                • Else - Actions
      • Wait 15.00 seconds
      • Game - Display to on_players for 15.00 seconds the text: Each human team has...
      • Wait 15.00 seconds
      • Game - Display to team1 for 15.00 seconds the text: Humans, remember th...
      • Game - Display to team2 for 15.00 seconds the text: Humans, remember th...
      • Game - Display to team3 for 15.00 seconds the text: As the shadow, you ...
 
Last edited:
Level 26
Joined
Aug 18, 2009
Messages
4,097
You could just as well ask us whether we have ever had a bug before. Try to reproduce it, find out on which event it occurs, disable parts of the map to narrow down the problem etc.

If we should help, send the map and some clue how to reproduce it.

Since it only disconnects players of team2/3, do you have some imported models that are only visible to them at that time? Or do you use the Current Camera Source/Target Position functions?
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
Try disabling parts of the initialization trigger until the splits stop.

Destructible - Pick every destructible in (Entire map) and do (Actions)
Opperations like this can be resource intensive if you have a lot of destructables. Splits have occasionally been linked to resource intensive script threads. Consider trying to break the initialization appart into shorter threads, or try repositioning some of the script that is not initially important to happen after map initialization.
 
Level 9
Joined
Jun 5, 2011
Messages
788
Actually no... because in that part i want to check if the player(integer A) is one of player 1 to 5 or one of player 6 to 10 or player 11 so that i can put them in different player groups.

Anyway... i modified it a bit and tried again with this:
  • Initialize
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Game - Set the time of day to 24.00
      • Game - Set time of day speed to 0.00% of the default speed
      • -------- ----- --------
      • Floating Text - Create floating text that reads Knight at (Center of pick knight <gen>) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 30.00% transparency
      • Floating Text - Create floating text that reads Scout at (Center of pick scout <gen>) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 30.00% transparency
      • Floating Text - Create floating text that reads Mage at (Center of pick mage <gen>) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 30.00% transparency
      • Floating Text - Create floating text that reads Priest at (Center of pick priest <gen>) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 30.00% transparency
      • Floating Text - Create floating text that reads Rogue at (Center of pick rogue <gen>) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 30.00% transparency
      • Floating Text - Create floating text that reads Hunter at (Center of pick hunter <gen>) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 30.00% transparency
      • Floating Text - Create floating text that reads Stalker at (Center of pick stalker <gen>) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 30.00% transparency
      • Floating Text - Create floating text that reads Sentinel at (Center of pick sentinel <gen>) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 30.00% transparency
      • Floating Text - Create floating text that reads Shapeshifter at (Center of pick shapeshifter <gen>) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 30.00% transparency
      • Floating Text - Create floating text that reads Shadowmancer at (Center of pick shadowmancer <gen>) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 30.00% transparency
      • -------- ----- --------
      • Player - Set name of Player 12 (Brown) to Animals
      • -------- ----- --------
      • For each (Integer A) from 1 to 5, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Player((Integer A))) slot status) Equal to Is playing
            • Then - Actions
              • Player Group - Add (Player((Integer A))) to on_players
              • Unit Group - Pick every unit in (Units owned by (Player((Integer A))) of type Choice) and do (Camera - Lock camera target for (Player((Integer A))) to (Picked unit), offset by (0.00, 0.00) using Default rotation)
              • Selection - Select (Units owned by (Player((Integer A))) of type Choice) for (Player((Integer A)))
              • Trigger - Add to Texts Descriptions <gen> the event (Player - (Player((Integer A))) Selects a unit)
              • Trigger - Add to Player leaves <gen> the event (Player - (Player((Integer A))) leaves the game)
              • Player Group - Add (Player((Integer A))) to team1
              • Set integer_team1 = (integer_team1 + 1)
              • Player Group - Add (Player((Integer A))) to team2
              • Set integer_team2 = (integer_team2 + 1)
              • Player Group - Add (Player((Integer A))) to team3
              • Set integer_team3 = (integer_team3 + 1)
            • Else - Actions
              • Unit Group - Pick every unit in (Units owned by (Player((Integer A)))) and do (Unit - Remove (Picked unit) from the game)
      • For each (Integer A) from 6 to 10, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Player((Integer A))) slot status) Equal to Is playing
            • Then - Actions
              • Player Group - Add (Player((Integer A))) to on_players
              • Unit Group - Pick every unit in (Units owned by (Player((Integer A))) of type Choice) and do (Camera - Lock camera target for (Player((Integer A))) to (Picked unit), offset by (0.00, 0.00) using Default rotation)
              • Selection - Select (Units owned by (Player((Integer A))) of type Choice) for (Player((Integer A)))
              • Trigger - Add to Texts Descriptions <gen> the event (Player - (Player((Integer A))) Selects a unit)
              • Trigger - Add to Player leaves <gen> the event (Player - (Player((Integer A))) leaves the game)
              • Player Group - Add (Player((Integer A))) to team2
              • Set integer_team2 = (integer_team2 + 1)
            • Else - Actions
              • Unit Group - Pick every unit in (Units owned by (Player((Integer A)))) and do (Unit - Remove (Picked unit) from the game)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Player(11)) slot status) Equal to Is playing
        • Then - Actions
          • Player Group - Add (Player(11)) to on_players
          • Unit Group - Pick every unit in (Units owned by (Player(11)) of type Choice) and do (Camera - Lock camera target for (Player(11)) to (Picked unit), offset by (0.00, 0.00) using Default rotation)
          • Selection - Select (Units owned by (Player(11)) of type Choice) for (Player(11))
          • Trigger - Add to Texts Descriptions <gen> the event (Player - (Player(11)) Selects a unit)
          • Trigger - Add to Player leaves <gen> the event (Player - (Player(11)) leaves the game)
          • Player Group - Add (Player(11)) to team3
          • Set integer_team3 = (integer_team3 + 1)
        • Else - Actions
          • Unit Group - Pick every unit in (Units owned by (Player(11))) and do (Unit - Remove (Picked unit) from the game)
      • Trigger - Run Basic items spawn <gen> (checking conditions)
      • Trigger - Run Basic items spawn <gen> (checking conditions)
      • Trigger - Run Basic items spawn <gen> (checking conditions)
      • Trigger - Run secondary items spawn <gen> (checking conditions)
      • Trigger - Run Animals spawn1 <gen> (checking conditions)
      • Trigger - Run Starting items <gen> (checking conditions)
      • Trigger - Run Books <gen> (checking conditions)
      • Trigger - Turn off (This trigger)
      • Unit - Remove Hide from Rogue 0021 <gen>
      • Game - Display to on_players for 15.00 seconds the text: Greetings... Becaus...
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (integer_team2 Equal to 0) and (integer_team3 Equal to 0)
        • Then - Actions
          • Set testmode = True
          • Game - Display to on_players the text: TEST MODE IS ACTIVE...
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (integer_team1 Equal to 0) and (integer_team3 Equal to 0)
            • Then - Actions
              • Set testmode = True
              • Game - Display to on_players the text: TEST MODE IS ACTIVE...
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (integer_team2 Equal to 0) and (integer_team1 Equal to 0)
                • Then - Actions
                  • Set testmode = True
                  • Game - Display to on_players the text: TEST MODE IS ACTIVE...
                • Else - Actions
      • Wait 15.00 seconds
      • Game - Display to on_players for 15.00 seconds the text: Each human team has...
      • Wait 15.00 seconds
      • Game - Display to team1 for 15.00 seconds the text: Humans, remember th...
      • Game - Display to team2 for 15.00 seconds the text: Humans, remember th...
      • Game - Display to team3 for 15.00 seconds the text: As the shadow, you ...
It seems to cause the same problem... Although i think Dr. Super Good is right... maybe the destructibles trigger is a problem because i moved that part into another trigger that fires 1 second after map initialization and it seems to disconnect players then.

I'll try removing that one and see what happens.
 
Level 9
Joined
Jun 5, 2011
Messages
788
I tried disabling the destructible... it's clearly not the problem... Ok i see your point now. So what do you suggest? Instead of using integer A from 6 so 10 should i use integer B?

EDIT: Nevermind... i tried using Integer B and it doesn't solve the problem.
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
Overuse of the integer a may cause desync or even bugs

Since when? You should not overlap the use like creating nested Integer A loops because it is a global variable but otherwise you can call it as much as you want.

@Dr Super Good: You always write that desyncs can occur because of stressing operations but frankly, I have like never had one due to burden. The destructable loop is outsourced, so are the other executed triggers shown here.
 
Level 17
Joined
Jan 21, 2010
Messages
2,111
Dunno, but i got some bugs with the integer a in my system (private)
the system it self is a respawning trigger
The bug occured is:
When i tried it, at the first thru 6000th-ish kill, it works perfectly, bUt after that the trigger won't 'ressurect' the dead unit anymore
 
Level 9
Joined
Jun 5, 2011
Messages
788
Ok... so i found the problem, sort of...
It seems that by removing this part from the trigger the disconnection will not occur. Now i just need to figure out how to stop the disconnection from happening... or to make a similar trigger to these actions so that i can still set the teams for the players.
  • For each (Integer integ1) from 1 to 5, do (Actions)
    • Loop - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Player(integ1)) slot status) Equal to Is playing
        • Then - Actions
          • Player Group - Add (Player(integ1)) to on_players
          • Unit Group - Pick every unit in (Units owned by (Player(integ1)) of type Choice) and do (Camera - Lock camera target for (Player(integ1)) to (Picked unit), offset by (0.00, 0.00) using Default rotation)
          • Selection - Select (Units owned by (Player(integ1)) of type Choice) for (Player(integ1))
          • Trigger - Add to Texts Descriptions <gen> the event (Player - (Player(integ1)) Selects a unit)
          • Trigger - Add to Player leaves <gen> the event (Player - (Player(integ1)) leaves the game)
          • Player Group - Add (Player(integ1)) to team1
          • Set integer_team1 = (integer_team1 + 1)
        • Else - Actions
          • Unit Group - Pick every unit in (Units owned by (Player(integ1))) and do (Unit - Remove (Picked unit) from the game)
  • For each (Integer integ1) from 6 to 10, do (Actions)
    • Loop - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Player(integ1)) slot status) Equal to Is playing
        • Then - Actions
          • Player Group - Add (Player(integ1)) to on_players
          • Unit Group - Pick every unit in (Units owned by (Player(integ1)) of type Choice) and do (Camera - Lock camera target for (Player(integ1)) to (Picked unit), offset by (0.00, 0.00) using Default rotation)
          • Selection - Select (Units owned by (Player(integ1)) of type Choice) for (Player(integ1))
          • Trigger - Add to Texts Descriptions <gen> the event (Player - (Player(integ1)) Selects a unit)
          • Trigger - Add to Player leaves <gen> the event (Player - (Player(integ1)) leaves the game)
          • Player Group - Add (Player(integ1)) to team2
          • Set integer_team2 = (integer_team2 + 1)
        • Else - Actions
          • Unit Group - Pick every unit in (Units owned by (Player(integ1))) and do (Unit - Remove (Picked unit) from the game)
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • ((Player(11)) slot status) Equal to Is playing
    • Then - Actions
      • Player Group - Add (Player(11)) to on_players
      • Unit Group - Pick every unit in (Units owned by (Player(11)) of type Choice) and do (Camera - Lock camera target for (Player(11)) to (Picked unit), offset by (0.00, 0.00) using Default rotation)
      • Selection - Select (Units owned by (Player(11)) of type Choice) for (Player(11))
      • Trigger - Add to Texts Descriptions <gen> the event (Player - (Player(11)) Selects a unit)
      • Trigger - Add to Player leaves <gen> the event (Player - (Player(11)) leaves the game)
      • Player Group - Add (Player(11)) to team3
      • Set integer_team3 = (integer_team3 + 1)
    • Else - Actions
      • Unit Group - Pick every unit in (Units owned by (Player(11))) and do (Unit - Remove (Picked unit) from the game)
EDIT: I think i will post the trigger on the triggers section and see if someone has any ideas on how to recreate it so that it won't disconnect players.
 
Level 9
Joined
Jun 5, 2011
Messages
788
Yes, it's the player distribution because it only disconnects players from teams 1 and 2. The idea is basically simple. I have 3 forces. The first is with players 1 to 5, the second is with the players from 6 to 10 and the last one is player 11th.
Players from the first and second force have the same hero selection zone. And when they choose a hero i want it to check if they are from team 1 or team 2 so i can know where the hero should be teleported (at which starting zone).
Also in the same time i need to check how many players are in a team so that when let's say they leave or their heroes die... the win/lose trigger activates (only if there are heroes left only in one team).
PS: sorry i need to go to high school, i'll check the thread and send you more details after 8 hours.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
Unit Group - Pick every unit in (Units owned by (Player(integ1)) of type Choice) and do (Camera - Lock camera target for (Player(integ1)) to (Picked unit), offset by (0.00, 0.00) using Default rotation)
Selection - Select (Units owned by (Player(integ1)) of type Choice) for (Player(integ1))
The camera action makes little sense. Why are you implementing an itterative step when a camera can only have 1 locked target?
Selection generates net traffic, thus is prone to cause desyncs.

It could be something as simple as you issuing too many selection orders at once.

Also try removing all the leaks from your script, avoidable leaks at map initialization is not a trait that good maps should have.
 
Level 9
Joined
Jun 5, 2011
Messages
788
Oh... so maybe the selection is the problem. Ok i will try to see into that. Thanks.
About the camera... the thing is that even though i used a "pick every unit" i know there is only one unit of type choice for each player so there's no chance of locking onto more units.
About leaks... well could you point them out? I'm still new to the notion so it's hard for me to spot them all.


EDIT: Finally made it work. I removed the selection actions and it works just fine now. Thanks a lot Dr. Super Good! You have rep from me :)
 
Last edited:
Status
Not open for further replies.
Top