Hi guys! I've got a problem with global vars. I have a map where you have to activate a lever, then the global var ("VarEle") should switch to 1 (activate an elevator). The script of the map (where the lever is): 
void OnEnter()
{
SetEntityConnectionStateChangeCallback("lever1", "func_piston");
}
void func_piston(string &in asEntity, int alState)
{ 
 if (alState == 1)
 {
 AddGlobalVarInt("VarEle", 1);
 SetMoveObjectStateExt("Entity_Piston", 0.6, 0.6, 8, 0, false); 
 PlaySoundAtEntity("", "move_gate.snt", "Entity_Piston", 0, false);
 return;
 }
}
So, the var should effect an elevator to switch the map (fade out and change map). The script of the other map (where the elevator is):
void OnEnter()
{
CreateParticleSystemAtEntity("FountainPourBlood", "ps_childsnake_blood_stream.ps", "ScriptArea_1", true);
CreateParticleSystemAtEntity("FountainPourBlood", "ps_childsnake_blood_stream.ps", "ScriptArea_2", true);
PlayMusic("02_amb_safe.ogg", true, 5.0f, 0.7f, 10, true);
 if (GetGlobalVarInt("VarEle")== 1)
	{
 SetEntityConnectionStateChangeCallback("elevator_lever_2", "activate_attic");
	}
}
void activate_attic(string &in asEntity, int alState)
{
 if (alState == 1)
 {
 FadeOut(3);
 ChangeMap("attic.map", "PlayerStartArea_1", "", "");
 }
}
void OnLeave()
{
StopMusic(0,0);
}
The main problem is that if I pull the lever down, nothing happens. Please correct me, if you know a way to solve this problem