Because the condition is NOT true and false at the same time. compare that trigger with saying:
-
If (all conditions are true) then do (then actions) else do (else actions)
-
If - conditions
-
Player Comparison - (triggering player) equal to Player 1 (red)
-
Then - actions
-
Else - actions
-
If (all conditions are true) then do (then actions) else do (else actions)
-
If - conditions
-
Player Comparison - (triggering player) equal to Player 2 (blue)
The condition "type" obviously is the same: it's a player comparison. However, the conditions themselves aren't the same because you're seeing whether triggering player is player 1 OR player 2.
In the getlocalplayer() function, a "player" variable is returned. Thus, when you say something like
if GetLocalPlayer() == Player(0) then
then GetLocalPlayer() will actually be *replaced* by the player behind the computer. Imagine that the trigger is running for player 0. This is what happens:
Custom script: if
Player(0) == Player(0) then
Custom script: <these actions will happen because player 0 IS player 0>
Custom script: elseif
Player(0) == Player(1) then
Custom script: <these actions won't happen because player 0 IS NOT player 1>
Custom script: endif
The same trigger runs for player 2, and every other player. However, for those players, GetLocalPlayer() will return Player(1) or Player(2)
Resulting in:
Custom script: if
Player(1) == Player(0) then
Custom script: <these actions won't happen>
Custom script: elseif
Player(1) == Player(1) then
Custom script: <these actions will happen>
Custom script: endif
As every trigger runs on every computer simultanously, all those if/then/else clauses will be checked. However, for player 0, other things will happen than for player 1, because other conditions are true.