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 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
I copied and pasted it but i got an error saying, "main (6,6) :ERR : No matching signatures to 'AddEntityCollideCallBack(string@&, string@&, string@&, const bool, const uint)' "
(04-15-2013, 03:28 AM)X5KillerKlownzX Wrote:
(04-15-2013, 01:33 AM)ROMul8r Wrote: Where your issue is:
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 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
I copied and pasted it but i got an error saying, "main (6,6) :ERR : No matching signatures to 'AddEntityCollideCallBack(string@&, string@&, string@&, const bool, const uint)' "
I mean (6,5)
(This post was last modified: 04-15-2013, 03:36 AM by X5KillerKlownzX.)