You should place your codes inside a while-loop, otherwise
it never call swim_mode() even is_swim_mode == 1.

Code:

action PlBiped01
{
while(my != NULL)
{
if (is_swim_mode == 1)
{
swim_mode();
} else {
// the rest of PlBiped01 action code
}
wait(1);
}
}