Xtron, please let me answer these. It's my thread.
JetlinerX, I'll build the whole script from scratch that will show that when the player unlocks a door, a monster is set active and once it hits the player, the credits start.
void OnStart()
{
AddUseItemCallback("", "Key01", "Door", "Func01", true);
AddEntityCollideCallback("Player", "MonsterName", "Func02", true, 1);
}
void Func01(string &in asItem, string &in asEntity)
{
RemoveItem(asItem);
SetSwingDoorLocked(asEntity, false, true);
PlaySoundAtEntity("", "unlock_door.snt", asEntity, 0, false);
SetEntityActive("MonsterName", true);
}
void Func02(string &in asParent, string &in asChild, int alState)
{
SetPlayerHealth(100);
GivePlayerDamage(100, "Claws", false, false);
FadeOut(3);
FadePlayerRollTo(90, 8, 12);
MovePlayerHeadPos(0, 3, 0, 3, 2.5);
AddTimer("", 2, Func03);
}
void Func03(string &in asTimer)
{
StartCredits("18_amb.ogg", true, "Credits", "Text", 5);
}
This may or may not work, I haven't tested it. By all means, you should edit and change some parts to the script to work with your script.