I have been testing my Sandbox levels and noticed that the swimming alarm code works for 99%
of the situations. However, there was an issue when your characters head is above water whilst
the characters feet are underwater.
I investigated the issue, and concluded that if your character is not swimming,
the value of breath/air is "undefined" (believe it is something like -1)
The issue is when your character is swimming, but has head above water, value of
swimming is true, but breath is "undefined" so alarm sounds
In order to fix this, use the following:
if swimming = true & breath > 0
{
if breath < 3000
{
sfx = 5
loop = staggered
}
}
You can interpret the first 'if statement' as: if character is swimming and breath value is defined