How to detect if a player left defeated?

Status
Not open for further replies.
When the player leaves, check if the bj_meleeDefeated boolean array is set for them. Note the mapping is with index 0 representing Player(0) which is GUI Player 1 Red.

If you want GUI interoperability the following custom script can be used.
JASS:
set udg_TempBoolean = bj_meleeDefeated[GetPlayerId(udg_TempPlayer)]
Where TempBoolean is a boolean variable and TempPlayer is a player variable.

To use, set TempPlayer to the player you want to test, run the custom script line and then test if TempBoolean is equal to true. If equal to true the player was defeated by the Melee defeat system. If false the player was not defeated with the melee defeat system. To achieve what you are after, run this in response to a player leaves the game event with TempPlayer set to Triggering Player. If TempBoolean is true then the player has been defeated by the melee defeat system and has just left the game.
 
Status
Not open for further replies.
Back
Top