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
Identifier error! Help!
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#2
RE: Identifier error! Help!

Where your issue is:
Spoiler below!

(04-14-2013, 11:21 PM)X5KillerKlownzX Wrote: void OnStart()
{
AddEntityCollideCallback("Player", "TeleportScript", "NailThatSucker", true, 1);
}

void NailThatSucker(string &in asParent, string &in asChild, int alStates)

{
SetEntityActive("Jesus", true);
AddPropForce("Jesus",10000, 0, 0, "world");
PlaySoundAtEntity("", "24_iron_maiden.snt", "Jesus", 0, false);
}

AddEntityCollideCallBack("Player", "PlayerCollide", "MonsterFunction", true, 1);

void MonsterFunction(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Badguy", true);
}

void OnEnter()
{

}

void OnLeave()

{

}

AddEntityCollideCallBack("Player", "PlayerCollide", "MonsterFunction", true, 1);
Is your problem. It is has to be declared when something else happens or when you start the map. Change your code to this:
void OnStart()

{  

    AddEntityCollideCallback("Player", "TeleportScript", "NailThatSucker", true, 1);
    AddEntityCollideCallBack("Player", "PlayerCollide", "MonsterFunction", true, 1);

}



void NailThatSucker(string &in asParent, string &in asChild, int alStates)

{

    SetEntityActive("Jesus", true);

    AddPropForce("Jesus",10000, 0, 0, "world");

    PlaySoundAtEntity("", "24_iron_maiden.snt", "Jesus", 0, false);

}


void MonsterFunction(string &in asParent, string &in asChild, int alState)

{

    SetEntityActive("Badguy", true);

}



void OnEnter()

{



}



void OnLeave()

{



}
Now that we are adding the callback when the map loads up, it should work fine Smile

Discord: Romulator#0001
[Image: 3f6f01a904.png]
(This post was last modified: 04-15-2013, 01:38 AM by Romulator.)
04-15-2013, 01:33 AM
Find


Messages In This Thread
Identifier error! Help! - by X5KillerKlownzX - 04-14-2013, 11:21 PM
RE: Identifier error! Help! - by Romulator - 04-15-2013, 01:33 AM
RE: Identifier error! Help! - by X5KillerKlownzX - 04-15-2013, 03:28 AM
RE: Identifier error! Help! - by NaxEla - 04-15-2013, 03:53 AM
RE: Identifier error! Help! - by X5KillerKlownzX - 04-15-2013, 04:21 AM
RE: Identifier error! Help! - by NaxEla - 04-15-2013, 08:58 AM
RE: Identifier error! Help! - by Romulator - 04-15-2013, 10:30 AM



Users browsing this thread: 1 Guest(s)