Amnesia level editor setting monsters
Iv'e recently started making a custom story for amnesia and ive starting having a bit of trouble. iv'e made doors unlock with keys and i made a monster also spawn when that door was unlocked but by accident i actually wanted to be able to open the door and walk down the hall to another room and upon walking into the room a monster spawn but it wasn't working this is my .hps script im only 16 and i started learning this stuff yesterday so if its totally wrong im sorry there isnt a tutorial for me to follow.
void OnStart()
{
AddUseItemCallback("", "key", "door", "KeyOnDoor", true);
}
void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("door", false, true);
PlaySoundAtEntity("", "unlock_door", "door", 0, false);
RemoveItem("key");
}
{
AddEntityCollideCallback("Player", "PlayerCollide", "MonsterFunction", true, 1);
}
void MonsterFunction(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("grunt", true);
AddEnemyPatrolNode("grunt", "PathNodeArea_1", 2, "");
AddEnemyPatrolNode("grunt", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("grunt", "PathNodeArea_3", 4, "");
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}
|