06-30-2012, 12:30 AM
So i know a lot of amnesia custom stories have things jumping out at them, like random objects or entities jumping out at them after they pick up a crowbar (in the CS: Can't Remember).
So, I have one of those iron maiden things, with the metal head and the wooden body, with spikes inside named 'monstercontain'. It works perfect, I have a HPS file that i am using (below) uses a key with that door, amongst others. I want, when the player opens the door to it to have a monster to spawn behind them, say 10-15 meters.
My HPS file (ask if you need anything else). Also, do you have a different HPS file per level you have in your story? Thanks <3
void OnStart()
{
AddUseItemCallback("", "monsterdoorkey_1", "monsterdoor", "UsedKeyOnDoor", true);
AddUseItemCallback("", "irondoor_key", "irondoor", "UsedKeyOnDoor", true);
AddUseItemCallback("", "monstercontain_key", "monstercontain", "UsedKeyOnDoor", true);
AddUseItemCallback("", "02_key", "02_door", "UsedKeyOnDoor", true);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked(asEntity, false, true);
PlaySoundAtEntity("", "unlock_door.snt", asEntity, 0, false);
RemoveItem(asItem);
}
So, I have one of those iron maiden things, with the metal head and the wooden body, with spikes inside named 'monstercontain'. It works perfect, I have a HPS file that i am using (below) uses a key with that door, amongst others. I want, when the player opens the door to it to have a monster to spawn behind them, say 10-15 meters.
My HPS file (ask if you need anything else). Also, do you have a different HPS file per level you have in your story? Thanks <3
void OnStart()
{
AddUseItemCallback("", "monsterdoorkey_1", "monsterdoor", "UsedKeyOnDoor", true);
AddUseItemCallback("", "irondoor_key", "irondoor", "UsedKeyOnDoor", true);
AddUseItemCallback("", "monstercontain_key", "monstercontain", "UsedKeyOnDoor", true);
AddUseItemCallback("", "02_key", "02_door", "UsedKeyOnDoor", true);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked(asEntity, false, true);
PlaySoundAtEntity("", "unlock_door.snt", asEntity, 0, false);
RemoveItem(asItem);
}