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
HPL2 Help?
raptorhunter6 Offline
Junior Member

Posts: 33
Threads: 4
Joined: Jun 2012
Reputation: 0
#1
HPL2 Help?

I get a "Fatal Error: Could Not Load Script File 'maps/castlehall.hps'! main (13,1) ERR:Unexpected '}' "

My Hps file is:


////////////////////////////
// Run first time starting map
void OnStart()
{
AddEntityCollideCallback("Player", "RoomOneArea", "CollideRoomOne", true, 1);
}

void CollideRoomOne(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("castle_1", true, true);
}

{
SetEntityPlayerInteractCallback("Main_Key", "ActivateMonster", true);
}

void ActivateMonster(string &in asEntity)
{
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 0, "idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_3", 0, "idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_4", 0, "idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_5", 0, "idle");
}

////////////////////////////
// Run when entering map
void OnEnter()
{
AddUseItemCallback("", "Main_Key", "MainDoorOne", "UsedKeyOnDoor", true);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("MainDoorOne", false, true);
PlaySoundAtEntity("", "unlock_door", "MainDoorOne", 0, false);
RemoveItem("Main_Key");
}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}


-------------------------> Its simple but its what I need for this map so far, it worked fine until I added:

" {
SetEntityPlayerInteractCallback("Main_Key", "ActivateMonster", true);
}

void ActivateMonster(string &in asEntity)
{
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 0, "idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_3", 0, "idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_4", 0, "idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_5", 0, "idle");
} "


I'm sorry if its something simple or something, I'm just beginning to use the Editor + Scripting, thank you in advance!
(This post was last modified: 07-26-2012, 08:35 AM by Your Computer.)
07-26-2012, 08:32 AM
Find


Messages In This Thread
HPL2 Help? - by raptorhunter6 - 07-26-2012, 08:32 AM
RE: HPL2 Help? - by Your Computer - 07-26-2012, 08:36 AM
RE: HPL2 Help? - by Adny - 07-26-2012, 08:36 AM
RE: HPL2 Help? - by raptorhunter6 - 07-26-2012, 08:49 AM



Users browsing this thread: 1 Guest(s)