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
Amnesia editor ERROR IN HPS FILE!
LienCraft Offline
Junior Member

Posts: 1
Threads: 1
Joined: Feb 2014
Reputation: 0
#1
Amnesia editor ERROR IN HPS FILE!

[/i]So this problem goes away when i delete the key codes but when i enter it i can't start my Custom Story, HELP!

My Hps File:

void OnStart()
{
AddUseItemCallback("", "Key1", "Key1Door", "Door1", true);
}

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

{
SetEntityPlayerInteractCallback("Key1", "ActivateMonster", true);

AddEntityCollideCallback("Player", "PlayerCollide", "MonsterFunction", true, 1);
}

void MonsterFunction(string&in asParent, string &in asChild, int alState)
{
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0.001, "");
SetEntityActive("servant_grunt_1", true);
}

void ActivateMonster(string &in item)
{
SetEntityActive("Brute1", true);
AddEnemyPatrolNode("Brute1", "PathNodeArea_3", 0, "idle");
AddEnemyPatrolNode("Brute1", "PathNodeArea_4", 0, "idle");
AddEnemyPatrolNode("Brute1", "PathNodeArea_5", 0, "idle");
AddEnemyPatrolNode("Brute1", "PathNodeArea_6", 0, "idle");
AddEnemyPatrolNode("Brute1", "PathNodeArea_7", 0, "idle");
AddEnemyPatrolNode("Brute1", "PathNodeArea_8", 0, "idle");
AddEnemyPatrolNode("Brute1", "PathNodeArea_9", 0, "idle");
}
02-08-2014, 04:05 PM
Find
Wapez Offline
Senior Member

Posts: 360
Threads: 37
Joined: Mar 2012
Reputation: 19
#2
RE: Amnesia editor ERROR IN HPS FILE!

(02-08-2014, 04:05 PM)LienCraft Wrote: {
SetEntityPlayerInteractCallback("Key1", "ActivateMonster", true);

AddEntityCollideCallback("Player", "PlayerCollide", "MonsterFunction", true, 1);
}

These brackets are not connected to a function. Are they supposed to be in the OnStart() function maybe?

PHP Code: (Select All)
void OnStart()
{
SetEntityPlayerInteractCallback("Key1""ActivateMonster"true);

AddEntityCollideCallback("Player""PlayerCollide""MonsterFunction"true1);


Founder & Legally Accountable Publisher of Red Line Games.
Environment & Gameplay Designer and Scripter.
http://moddb.com/mods/in-lucys-eyes
(This post was last modified: 02-08-2014, 04:10 PM by Wapez.)
02-08-2014, 04:08 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#3
RE: Amnesia editor ERROR IN HPS FILE!

Also be sure to move those functions to your already existant OnStart block. Having 2 will also cause a crash, and naming it OnStart2 will have it lose its effect.

Just felt like I'd mention this because I've seen many people try it.

02-08-2014, 04:44 PM
Find




Users browsing this thread: 1 Guest(s)