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.)
|