Frictional Games Forum (read-only)

Full Version: script help
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
AddEntityCollideCallback("player", "Monster_Deactivate_1", "DeactivateGrunt", true, 1);
}

void DeactivateGrunt(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_2", false);
}

is there anything wrong in that i get no error but the script doesnt work by the names you should know what i am trying to do so is anything wrong in it?
(04-04-2012, 12:15 PM)zombiehacker595 Wrote: [ -> ]AddEntityCollideCallback("player", "Monster_Deactivate_1", "DeactivateGrunt", true, 1);
}

void DeactivateGrunt(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_2", false);
}

is there anything wrong in that i get no error but the script doesnt work by the names you should know what i am trying to do so is anything wrong in it?
There is something called "debug messages" that can help you track down the root of your many problems. Just add the following in various places of your code:
AddDebugMessage("Well, at least this part of the code was executed.", false);

Just by setting this line inside your DeactivateGrunt() function, you can find out if the first two lines are working as they should or not.

Just making sure... you do have a "{" before your Collide right? Such as:

{
AddEntityCollideCallback("player", "Monster_Deactivate_1", "DeactivateGrunt", true, 1);
}

void DeactivateGrunt(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_2", false);
}
Try this
{
AddEntityCollideCallback("Player", "Monster_Deactivate_1", "DeactivateGrunt", true, 1);
}

void DeactivateGrunt(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_2", false);
}
The addentitycollidecallback had player and i think its supposed to be capitalized like Player try that

(04-04-2012, 12:15 PM)zombiehacker595 Wrote: [ -> ]AddEntityCollideCallback("player", "Monster_Deactivate_1", "DeactivateGrunt", true, 1);
}

void DeactivateGrunt(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_2", false);
}

is there anything wrong in that i get no error but the script doesnt work by the names you should know what i am trying to do so is anything wrong in it?
{
AddEntityCollideCallback("player", "Monster_Deactivate_1", "DeactivateGrunt", true, 1);
}

void DeactivateGrunt(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_2", false);
}



try that
Is the grunt called "servant_grunt_2"?
Is the area called "Monster_Deactivate_1"?

Try capitalizing "player" to "Player".
(04-04-2012, 07:53 PM)Putmalk Wrote: [ -> ]Is the grunt called "servant_grunt_2"?
Is the area called "Monster_Deactivate_1"?

Try capitalizing "player" to "Player".
I already said that capitalizing the player to Player now we just wait for the answer did it work Big Grin
(04-04-2012, 08:01 PM)Datguy5 Wrote: [ -> ]
(04-04-2012, 07:53 PM)Putmalk Wrote: [ -> ]Is the grunt called "servant_grunt_2"?
Is the area called "Monster_Deactivate_1"?

Try capitalizing "player" to "Player".
I already said that capitalizing the player to Player now we just wait for the answer did it work Big Grin
Yup, hopefully. Smile