Frictional Games Forum (read-only)

Full Version: ChangeMap doesn't work!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi!
I'm actually working on a custom story, and at a moment the player is supposed to fall on a hole... So I created a ChangeMap script but it doesn't work. In fact, the next map don't load and I fall endlessly...I've already got a map named "souterrains" and a playerstartarea on it...
Here's the script:


void OnStart()
{
AddEntityCollideCallback("Player", "hole", "Changement", true, 1);
}

void Changement(string& asMapName, string& asStartPos, string& asStartSound, string& asEndSound)
{
ChangeMap("souterrains", "PlayerStartArea_1","","");
}
You have the wrong callback syntax.
Please, can you tell me where I have spelled it wrong?
Found it. I had to replace:
void Changement(string& asMapName, string& asStartPos, string& asStartSound, string& asEndSound)


with:
void Changement(string &in asParent, string &in asChild, int alState)