Frictional Games Forum (read-only)
[SCRIPT] script help - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: [SCRIPT] script help (/thread-14482.html)



script help - zombiehacker595 - 04-04-2012

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?



RE: script help - Cranky Old Man - 04-04-2012

(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.




RE: script help - JetlinerX - 04-04-2012

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);
}



RE: script help - Datguy5 - 04-04-2012

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




RE: script help - jessehmusic - 04-04-2012

(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


RE: script help - Putmalk - 04-04-2012

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

Try capitalizing "player" to "Player".



RE: script help - Datguy5 - 04-04-2012

(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



RE: script help - Putmalk - 04-04-2012

(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