Yes I realized that xD
ok so to make a global variable to work you need to make a global.hps file that you put inside your maps folder.
then inside the global.hps you write this
////////////////////////////
// Run at the start of the game.
void OnGameStart()
{
SetGlobalVarInt("NAMEOFVARIABLE", 0);}
then open your forest.hps and inside OnEnter() you write this:
void OnEnter()
{
if(GetGlobalVarInt("NAMETHEGLOBALVARIABLE") == 1)
{
SetLevelDoorLocked("NAMEOFLEVELDOOR", false);
}
else return;
}
then to make the global variable 1 since it was 0, you add this in the same function in AbandonedHouse.hps as the SetLevelDoorLocked code.
AddGlobalVarInt("NAMEOFTHEGLOBALVAR", 1);
I think I got everything ^^