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


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Grunt PathNode Help
MrElTacoTeh3rd Offline
Junior Member

Posts: 1
Threads: 1
Joined: Nov 2012
Reputation: 0
#1
Question  Grunt PathNode Help

I was working on a CS and I was trying to make it so when you picked up a certain key, a Grunt would be activated and follow Path Nodes. After putting in the script and testing it, the game crashed and I got this error.

"FATAL ERROR: Could not load script file 'custom_stories/Taco's Story/maps/tacostory.hps'! main (22, 1) : ERR : Unexpected token '{'".

And here is my .hps


void OnStart()

{
AddUseItemCallback("", "sexy_1", "mansion_3", "UsedKeyOnDoor", true);
AddUseItemCallback("", "salkey_1", "level_hub_1", "UsedKeyOnCabinet", true);
}

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

void UsedKeyOnCabinet(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("level_hub_1", false, true);
PlaySoundAtEntity("", "unlock_door", "level_hub_1", 0, false);
RemoveItem("salkey_1");
}

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

void OnEnter()
{

}

void OnLeave()
{

}

void ActivateMonster(string &in item)
{
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");
}


I'm new to this kind of scripting but can anyone help me?

[EDIT] Don't worry I figured it out now. I put one of the scripts on the wrong line. Tongue
(This post was last modified: 11-11-2012, 06:45 AM by MrElTacoTeh3rd.)
11-11-2012, 03:48 AM
Find




Users browsing this thread: 1 Guest(s)