01-25-2013, 08:16 AM
Okay guys, so I have been doing this whole Custom Story thing for a few days now, but one thing is really confusing me. Below, I have posted my .hps for a map i'm making. What I really don't understand is how "grunt3" will never spawn. I think it's to do with the two brackets, where there's no "void" bit inbetween. I can get this map running, but I've purposely left that gap so you guys could help me with it. Any ideas?
void OnStart()
{
AddEntityCollideCallback("Player", "grunt_area", "monster", true,1);
AddEntityCollideCallback("grunt1","stop","CollideStop",true,1);
}
void monster(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("grunt1",true);
AddEnemyPatrolNode("grunt1","node_1",0,"");
AddEnemyPatrolNode("grunt1","node_2",0,"");
AddEnemyPatrolNode("grunt1","node_3",0,"");
AddEnemyPatrolNode("grunt1","node_4",0,"");
AddEnemyPatrolNode("grunt1","node_5",0,"");
}
void CollideStop(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("grunt1",false);
}
void OnEnter()
{
AddEntityCollideCallback("Player", "grunt2_area", "monster2", true,1);
AddEntityCollideCallback("grunt","stop","CollideStop2",true,1);
}
void monster2(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("grunt2",true);
AddEnemyPatrolNode("grunt2","grunt2node_1",0,"");
AddEnemyPatrolNode("grunt2","grunt2node_2",0,"");
AddEnemyPatrolNode("grunt2","grunt2node_3",0,"");
AddEnemyPatrolNode("grunt2","grunt2node_4",0,"");
AddEnemyPatrolNode("grunt2","grunt2node_5",0,"");
}
void CollideStop2(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("grunt2",false);
}
{
AddEntityCollideCallback("Player", "grunt3area", "monster3", true,1);
AddEntityCollideCallback("grunt3","stop","CollideStop3",true,1);
}
void monster3(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("grunt3",true);
AddEnemyPatrolNode("grunt3","grunt3node1",0,"");
AddEnemyPatrolNode("grunt3","grunt3node2",0,"");
AddEnemyPatrolNode("grunt3","grunt3node3",0,"");
}
void CollideStop3(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("grunt3",false);
}
void OnLeave()
{
}
void OnStart()
{
AddEntityCollideCallback("Player", "grunt_area", "monster", true,1);
AddEntityCollideCallback("grunt1","stop","CollideStop",true,1);
}
void monster(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("grunt1",true);
AddEnemyPatrolNode("grunt1","node_1",0,"");
AddEnemyPatrolNode("grunt1","node_2",0,"");
AddEnemyPatrolNode("grunt1","node_3",0,"");
AddEnemyPatrolNode("grunt1","node_4",0,"");
AddEnemyPatrolNode("grunt1","node_5",0,"");
}
void CollideStop(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("grunt1",false);
}
void OnEnter()
{
AddEntityCollideCallback("Player", "grunt2_area", "monster2", true,1);
AddEntityCollideCallback("grunt","stop","CollideStop2",true,1);
}
void monster2(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("grunt2",true);
AddEnemyPatrolNode("grunt2","grunt2node_1",0,"");
AddEnemyPatrolNode("grunt2","grunt2node_2",0,"");
AddEnemyPatrolNode("grunt2","grunt2node_3",0,"");
AddEnemyPatrolNode("grunt2","grunt2node_4",0,"");
AddEnemyPatrolNode("grunt2","grunt2node_5",0,"");
}
void CollideStop2(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("grunt2",false);
}
{
AddEntityCollideCallback("Player", "grunt3area", "monster3", true,1);
AddEntityCollideCallback("grunt3","stop","CollideStop3",true,1);
}
void monster3(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("grunt3",true);
AddEnemyPatrolNode("grunt3","grunt3node1",0,"");
AddEnemyPatrolNode("grunt3","grunt3node2",0,"");
AddEnemyPatrolNode("grunt3","grunt3node3",0,"");
}
void CollideStop3(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("grunt3",false);
}
void OnLeave()
{
}