I've tried it before but it didn't work for me. You could do this however:
void OnStart() { AddEntityCollideCallback("Player", "DeepWaterAbove", "StateFunction", false, 0); }
bool bInArea = false;
void StateFunction(string &in parent, string &in child, int state)
{
bInArea = state == 1 ? true : false;
}
Now you have a global boolean variable which you can call anywhere else in your script
EDIT: To clarify above, the variable is global in the sense that you can use it in other functions within the same hps file. You can't use it in a different map though. In that sense it is still local