if GetUIFloat "HUDMainMenu\BreathMeter\alpha"; underwaterelse; can haz airendif
Throw that in any GameMode block. Its results can be wrong at the main menu, like if you quit to the main menu while underwater (it'll still have a non-zero value).
If it's 0, the breath meter isn't visible, and the player's not underwater. If it's anything besides 0 (namely, 255), it's visible and so the player's underwater, even if he ahs waterbreathing (in which case the meter just stays full.
What I'm looking for (without success so far) is a way to tell how much air the player has left via script. Is there some trait to the breathmeter that returns how much of the meter is showing/hidden?
Queue