Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Problem With A Script
stjazz Offline
Junior Member

Posts: 5
Threads: 2
Joined: Jul 2012
Reputation: 0
#1
Problem With A Script

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!
07-07-2012, 08:43 AM
Find
palistov Offline
Posting Freak

Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation: 57
#2
RE: Problem With A Script

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: (Select All)
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.

07-07-2012, 09:24 AM
Find




Users browsing this thread: 1 Guest(s)