For some reason, my collide function isn't functioning properly. It's made by string variables to check if the correct things are pressed and so on.
void ButtonPress(string &in asEntity)
{
//Check which button that is currently being pressed
if(asEntity == "button_simple_1")
{
SetLocalVarString("Brother", "CurrentTeleportCutscene");
//Don't want the other buttons to be clicked at this point
for(int i=0;i<5;i++) SetEntityInteractionDisabled("button_simple_" + i, true);
}
void CollideChangeMap(string &in asParent, string &in asChild, int alState)
{
string sMapChange = GetLocalVarString("CurrentTeleportCutscene");
if(sMapChange == "Brother"){
ChangeMap("nomapyet.map", "TeleEnter_1", "", "");
}
}
void OnStart()
{
AddEntityCollideCallback("Player", "AreaChangeMap", "CollideChangeMap", true, 1);
}
I have checked the name of the area and it is correct. Still doesn't wanna work. Just making sure here, is there anything wrong in the script?
Derp.