Frictional Games Forum (read-only)

Full Version: Problem With A Script
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi, i have a problem with a script. (Fatal error)
Here is my script:



void OnStart()
{
PlayMusic("ambience 1.ogg", true, 50, 5, 0, true);
AddEntityCollideCallback("Player", "noback", "noback", true, 1);
AddEntityCollideCallback("Player", "To_Under The Shadows CH3", "toUnder The Shadows CH3", true, 1);
}

void noback(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("noback1",true);
AddEnemyPatrolNode("noback1", "PathNodeArea_1", 0, "");
AddEnemyPatrolNode("noback1", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("noback1", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("noback1", "PathNodeArea_4", 0, "");
SetEntityActive("noback2",true);
AddEnemyPatrolNode("noback2", "PathNodeArea_1", 0, "");
AddEnemyPatrolNode("noback2", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("noback2", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("noback2", "PathNodeArea_4", 0, "");
SetEntityActive("noback3",true);
SetEntityActive("noback4",true);
FadePlayerFOVMulTo(3.5f, 0.01f);
GiveSanityDamage(3.0, true);
}

void toUnder The Shadows CH3(string &in asParent, string &in asChild, int alState)
{
ChangeMap("Under The Shadows CH3.map", "from_01", "", "");
}

Thanks for the support!
Can't have spaces in function names. You should be more specific about what errors your having. Post the contents of the fatal error message for future problems. Smile

PHP Code:
void toUnder_The_Shadows_CH3(...) {...} 

Do something like that. Change the string value in your entity collide callback as well. The ... is just a placeholder, by the way. Good luck.