The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What do i put in between } and { after SetEntityActive?
pingthepong Offline
Junior Member

Posts: 3
Threads: 1
Joined: Jan 2013
Reputation: 0
#1
What do i put in between } and { after SetEntityActive?

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()
{

}
01-25-2013, 08:16 AM
Find


Messages In This Thread
What do i put in between } and { after SetEntityActive? - by pingthepong - 01-25-2013, 08:16 AM



Users browsing this thread: 1 Guest(s)