AlexRobillard
Junior Member
Posts: 41
Threads: 5
Joined: Jun 2011
Reputation:
0
|
Path node issue...
I get an issue on the Monster2 path nodes something about no matching signatures, here is my script for the level.
void OnStart()
{
AddEntityCollideCallback("Player" , "Monster_Walk_Trigger" , "MonsterWalk1" , true , 1);
AddEntityCollideCallback("Player" , "Monster_Walk_Trigger2" , "MonsterWalk2" , true , 1);
AddEntityCollideCallback("Player" , "Monster_Walk_Trigger" , "AddEnemyPatrolNode" , true , 1);
AddEntityCollideCallback("Player" , "Monster_Walk_Trigger2" , "AddEnemyPatrolNode2" , true , 1);
AddEntityCollideCallback("Player" , "Door_Scare_Trigger" , "DoorScare" , true , 1);
}
void MonsterWalk1(string &in asParent , string &in asChild , int alState)
{
SetEntityActive("Monster1" , true);
AddEnemyPatrolNode("Monster1", "PathNodeArea_35", 3, "");
}
void MonsterWalk2(string &in asParent , string &in asChild , int alState)
{
SetEntityActive("Monster2" , true);
AddEnemyPatrolNode2("Monster2", "PathNodeArea_20", 3.0f, "");
AddEnemyPatrolNode2("Monster2", "PathNodeArea_4", 10.0f, "");
AddEnemyPatrolNode2("Monster2", "PathNodeArea_58", 1.0f, "");
AddEnemyPatrolNode2("Monster2", "PathNodeArea_59", 2.0f, "");
}
void DoorScare(string &in asParent , string &in asChild , int alState)
{
SetEntityActive("Door_Scare_Sound" , true);
SetEntityActive("Door_Scare_Effect" , true);
}
////////////////////////////
// Run when entering map
void OnEnter()
{
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}
Thanks for your time.
(This post was last modified: 07-10-2011, 08:59 PM by AlexRobillard.)
|
|
07-10-2011, 08:24 PM |
|
Khyrpa
Senior Member
Posts: 638
Threads: 10
Joined: Apr 2011
Reputation:
24
|
RE: Path node issue...
erm why do you have 2 collide collbacks for each area?
you can just drop these:
AddEntityCollideCallback("Player" , "Monster_Walk_Trigger" , "AddEnemyPatrolNode" , true , 1);
AddEntityCollideCallback("Player" , "Monster_Walk_Trigger2" , "AddEnemyPatrolNode2" , true , 1);
|
|
07-10-2011, 08:28 PM |
|
AlexRobillard
Junior Member
Posts: 41
Threads: 5
Joined: Jun 2011
Reputation:
0
|
RE: Path node issue...
He re-appears later in the level at a different area.
|
|
07-10-2011, 08:28 PM |
|
Khyrpa
Senior Member
Posts: 638
Threads: 10
Joined: Apr 2011
Reputation:
24
|
RE: Path node issue...
but their names are the same... so how is that possible?
And also when you trigger this:
AddEntityCollideCallback("Player" , "Monster_Walk_Trigger" , "MonsterWalk1" , true , 1);
it makes so that everything inside this happens
void MonsterWalk1(string &in asParent , string &in asChild , int alState)
{
}
in your case its these:
SetEntityActive("Monster1" , true);
AddEnemyPatrolNode("Monster1", "PathNodeArea_35", 3, "");
so the bolded one here:
AddEntityCollideCallback("Player" , "Monster_Walk_Trigger" , "AddEnemyPatrolNode" , true , 1);
would need
void AddEnemyPatrolNode(string &in asParent , string &in asChild , int alState)
this is kind of confusing... I don't know what youre trying to do
(This post was last modified: 07-10-2011, 08:32 PM by Khyrpa.)
|
|
07-10-2011, 08:29 PM |
|
AlexRobillard
Junior Member
Posts: 41
Threads: 5
Joined: Jun 2011
Reputation:
0
|
RE: Path node issue...
I don't understand what you mean, the player walks to the trigger area of Monser_Walk_Trigger and one monster spawns, then later in that same map/level the player walks to the trigger area of Monster_Walk_Trigger2 and a monster spawns.
(This post was last modified: 07-10-2011, 08:31 PM by AlexRobillard.)
|
|
07-10-2011, 08:31 PM |
|
Khyrpa
Senior Member
Posts: 638
Threads: 10
Joined: Apr 2011
Reputation:
24
|
RE: Path node issue...
No monster spawns because the first time you enter the area those both callbacks are called
I mean you have 2 collide callbacks that happen at the same time and another one of them (the one with AddEnemyPatrolNode) just does nothing (or is the cause for your error)
(This post was last modified: 07-10-2011, 08:34 PM by Khyrpa.)
|
|
07-10-2011, 08:33 PM |
|
AlexRobillard
Junior Member
Posts: 41
Threads: 5
Joined: Jun 2011
Reputation:
0
|
RE: Path node issue...
I don't understand, the first monster worked perfectly when I got to the first spawn area. Do you understand what I am trying to do, and if so can you put down the proper script because this is just getting confusing.
|
|
07-10-2011, 08:34 PM |
|
Khyrpa
Senior Member
Posts: 638
Threads: 10
Joined: Apr 2011
Reputation:
24
|
RE: Path node issue...
Ops you have quite more errors in there than I first noticed, give me a sec and I give you a full edit
|
|
07-10-2011, 08:36 PM |
|
AlexRobillard
Junior Member
Posts: 41
Threads: 5
Joined: Jun 2011
Reputation:
0
|
RE: Path node issue...
Okay, thank you.
|
|
07-10-2011, 08:36 PM |
|
Khyrpa
Senior Member
Posts: 638
Threads: 10
Joined: Apr 2011
Reputation:
24
|
RE: Path node issue...
void OnStart()
{
AddEntityCollideCallback("Player" , "Monster_Walk_Trigger" , "MonsterWalk1" , true , 1);
AddEntityCollideCallback("Player" , "Monster_Walk_Trigger2" , "MonsterWalk2" , true , 1);
AddEntityCollideCallback("Player" , "Door_Scare_Trigger" , "DoorScare" , true , 1);
}
void MonsterWalk1(string &in asParent , string &in asChild , int alState)
{
SetEntityActive("Monster1" , true);
AddEnemyPatrolNode("Monster1", "PathNodeArea_35", 3, "");
}
void MonsterWalk2(string &in asParent , string &in asChild , int alState)
{
SetEntityActive("Monster2" , true);
AddEnemyPatrolNode("Monster2", "PathNodeArea_20", 3.0f, "");
AddEnemyPatrolNode("Monster2", "PathNodeArea_4", 10.0f, "");
AddEnemyPatrolNode("Monster2", "PathNodeArea_58", 1.0f, "");
AddEnemyPatrolNode("Monster2", "PathNodeArea_59", 2.0f, "");
}
void DoorScare(string &in asParent , string &in asChild , int alState)
{
SetEntityActive("Door_Scare_Sound" , true);
SetEntityActive("Door_Scare_Effect" , true);
}
////////////////////////////
// Run when entering map
void OnEnter()
{
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}
That should do it
amnesia dsnt recognize AddEnemyPatrolNode2 cos thats not an function
and sorry for the hazzle
(This post was last modified: 07-10-2011, 08:39 PM by Khyrpa.)
|
|
07-10-2011, 08:38 PM |
|
|