zombiehacker595
Member
Posts: 141
Threads: 51
Joined: Mar 2012
Reputation:
3
|
script help
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 |
|
Cranky Old Man
Posting Freak
Posts: 986
Threads: 20
Joined: Apr 2012
Reputation:
38
|
RE: script help
(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.
|
|
04-04-2012, 12:39 PM |
|
JetlinerX
Senior Member
Posts: 599
Threads: 49
Joined: Jun 2011
Reputation:
19
|
RE: script help
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);
}
(This post was last modified: 04-04-2012, 03:47 PM by JetlinerX.)
|
|
04-04-2012, 03:46 PM |
|
Datguy5
Senior Member
Posts: 629
Threads: 25
Joined: Dec 2011
Reputation:
12
|
RE: script help
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, 06:00 PM |
|
jessehmusic
Senior Member
Posts: 423
Threads: 102
Joined: Dec 2011
Reputation:
8
|
RE: script help
(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
|
|
04-04-2012, 06:48 PM |
|
Putmalk
Senior Member
Posts: 290
Threads: 13
Joined: Apr 2012
Reputation:
15
|
RE: script help
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 |
|
Datguy5
Senior Member
Posts: 629
Threads: 25
Joined: Dec 2011
Reputation:
12
|
RE: script help
(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
|
|
04-04-2012, 08:01 PM |
|
Putmalk
Senior Member
Posts: 290
Threads: 13
Joined: Apr 2012
Reputation:
15
|
RE: script help
(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 Yup, hopefully.
|
|
04-04-2012, 09:15 PM |
|
|