also, if player 1 leaves, will this trigger run endlessly because the status will always be "p1 left"? Or will it run once, move the region and thats it?
What I do in situations like this, is switch over (or open) to an Untitled map and run some side-tests to see if something I'm curious about works or not. That way there's no possible way these tests can affect the map you're currently working on
The event is not reliable. I think it only fires when somebody leaves by quitting from the menu and will not fire if somebody gets disconnected or alt+F4's out. The workaround is to store all active players in a player group variable and then in a periodic trigger, check the status of all players in that player group. If it is left the game, remove the player from the player group and then handle the player having left.
The event is not reliable. I think it only fires when somebody leaves by quitting from the menu and will not fire if somebody gets disconnected or alt+F4's out. The workaround is to store all active players in a player group variable and then in a periodic trigger, check the status of all players in that player group. If it is left the game, remove the player from the player group and then handle the player having left.
Will this suffice? "Active number of players" MUST subtract 1 for every player not present and the region for each player must be moved when this occurs.
Your script would permanently detect a player as recently left every 30 seconds. The Status of a player stays at Left The Game even after the script notices the leaver. In your case that doesn't seem like a big problem, still..
Your script would permanently detect a player as recently left every 30 seconds. The Status of a player stays at Left The Game even after the script notices the leaver. In your case that doesn't seem like a big problem, still..
I tried using your custom event.. not sure what i'm doing there, nothing is named when i open the map : /
With my trigger posted above, if say, player 1 left, would every 30 seconds it -1 to the variable? Like in 1 minute would it subtract 2 from the variable? If so, how can i get it so that if player 1 leaves, it will only subtract 1 from the variable and no more for that player?
Your script would permanently detect a player as recently left every 30 seconds. The Status of a player stays at Left The Game even after the script notices the leaver. In your case that doesn't seem like a big problem, still..
I tried using your custom event.. not sure what i'm doing there, nothing is named when i open the map : /
With my trigger posted above, if say, player 1 left, would every 30 seconds it -1 to the variable? Like in 1 minute would it subtract 2 from the variable? If so, how can i get it so that if player 1 leaves, it will only subtract 1 from the variable and no more for that player?
Doh, damn Blizzard! Maps still don't get localized for other editors I guess. What language of Sc2 do you have?
Also, can you try whether the version I attached to this post works? I quickly localized it.
i'm going to try and test your event. Hopefully it works so i can finally publish my map publicly. Do you know if there is a way to make a trigger to kick a computer player or otherwise simulate a player leaving? If it's complicated forget it, I'll just wait for my friends lol
Thanks for all your help
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Does this event work? I heard somewhere that this event doesn't always work for some reason.
If a player leaves at any time DURING the game or at loading screen, dropped etc then modify variable. Will it work?
also, if player 1 leaves, will this trigger run endlessly because the status will always be "p1 left"? Or will it run once, move the region and thats it?
Hmm hard to say.
What I do in situations like this, is switch over (or open) to an Untitled map and run some side-tests to see if something I'm curious about works or not. That way there's no possible way these tests can affect the map you're currently working on
@Zurom:
The event is not reliable. I think it only fires when somebody leaves by quitting from the menu and will not fire if somebody gets disconnected or alt+F4's out. The workaround is to store all active players in a player group variable and then in a periodic trigger, check the status of all players in that player group. If it is left the game, remove the player from the player group and then handle the player having left.
Will this suffice? "Active number of players" MUST subtract 1 for every player not present and the region for each player must be moved when this occurs.
http://forums.sc2mapster.com/resources/trigger-libraries/11856-snippet-player-leaves-fixed
You can use this custom event.
Your script would permanently detect a player as recently left every 30 seconds. The Status of a player stays at Left The Game even after the script notices the leaver. In your case that doesn't seem like a big problem, still..
I tried using your custom event.. not sure what i'm doing there, nothing is named when i open the map : /
With my trigger posted above, if say, player 1 left, would every 30 seconds it -1 to the variable? Like in 1 minute would it subtract 2 from the variable? If so, how can i get it so that if player 1 leaves, it will only subtract 1 from the variable and no more for that player?
@copperfront: Go
Doh, damn Blizzard! Maps still don't get localized for other editors I guess. What language of Sc2 do you have?
Also, can you try whether the version I attached to this post works? I quickly localized it.
I tried using your custom event.. not sure what i'm doing there, nothing is named when i open the map : /
With my trigger posted above, if say, player 1 left, would every 30 seconds it -1 to the variable? Like in 1 minute would it subtract 2 from the variable? If so, how can i get it so that if player 1 leaves, it will only subtract 1 from the variable and no more for that player?
That worked :P I'll try to implement it and see if i can get it to work with my map :/ Thank you
i'm going to try and test your event. Hopefully it works so i can finally publish my map publicly. Do you know if there is a way to make a trigger to kick a computer player or otherwise simulate a player leaving? If it's complicated forget it, I'll just wait for my friends lol
Thanks for all your help