06-16-2012, 06:01 AM
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","","");
}
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","","");
}