Romulator
Not Tech Support ;-)
Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation:
195
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
Discord: Romulator#0001
(This post was last modified: 04-15-2013, 01:38 AM by Romulator .)