RE: Teleportation!
void OnStart()
{
AddUseItemCallback("", "key_laboratory_1", "mansion_8", "OpenDoor", true);
AddEntityCollideCallback("Player", "ScriptArea_2", "Falling", true, 1);
AddEntityCollideCallback("Player", "MorgueInsanity", "MorgueDoorClose", true, 1);
AddEntityCollideCallback("Player", "SkullFall", "FallingSkull", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_3", "PlaySound1", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_4", "FloorFall1", true, 1);
}
void OpenDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked(asEntity, false, true);
PlaySoundAtEntity("", "unlock_door", asEntity, 0, false);
RemoveItem(asItem);
}
void Falling(string &in asParent, string &in asChild, int alState)
{
AddPropForce("box_1", 0, 0, -2000, "world");
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
GiveSanityDamage(6.0f, true);
}
void MorgueDoorClose(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "close_door.snt", "Player", 0, false);
SetSwingDoorLocked("door_red_1", true, true);
SetSwingDoorClosed("door_red_1", true, true);
}
void FallingSkull(string &in asParent, string &in asChild, int alState)
{
AddPropForce("lab_cryo_head_1", 1800, 0, 0, "world");
SetPlayerActive(false);
GiveSanityDamage(6.0f, true);
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
AddTimer("", 1.0f, "lookatskull");
}
void lookatskull(string &in asTimer)
{
StartPlayerLookAt("lab_cryo_head_1", 10.0f, 10.0f, "");
AddTimer("", 1.0f, "skulllook");
}
void skulllook(string &in asTimer)
{
StartPlayerLookAt("corpse_male_torso_1", 10.0f, 10.0f, "");
PlaySoundAtEntity("", "react_scare", "Player", 0, false);
AddTimer("", 0.5f, "stoplook");
}
void stoplook(string &in asTimer)
{
StopPlayerLookAt();
SetPlayerActive(true);
}
void PlaySound1(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "00_faint.snt", "Player", 0, false);
}
void FloorFall1(string &in asParent, string &in asChild, int alState)
{
TeleportPlayer("PlayerStartArea_2");
}
void OnEnter()
{
}
void OnLeave()
{
}
Fixed.
"Veni, vidi, vici."
"I came, I saw, I conquered."
|