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
Forcing view of the player to look at a door when it slams shut
onv Offline
Member

Posts: 51
Threads: 12
Joined: Feb 2012
Reputation: 2
#5
RE: Forcing view of the player to look at a door when it slams shut

Use this :


void OnStart()
{
AddEntityCollideCallback("Player", "pooarea", "func_slam", true, 1);
}

void func_slam(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("mansion_1", true, true);
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_scare", "Player", 0, false);
PlaySoundAtEntity("", "close_door.snt", "Player", 0, false);

GiveSanityDamage(5.0f, true);
SetPlayerActive(false);
StartPlayerLookAt("mansion_1", 3.0f, 5.0f, "");
AddTimer("timer01", 1.5f, "StopLook");

void StopLook(string &in asTimer)
{
StopPlayerLookAt();
SetPlayerActive(true);
}
(This post was last modified: 02-12-2012, 08:13 PM by onv.)
02-12-2012, 08:10 PM
Find


Messages In This Thread
RE: Forcing view of the player to look at a door when it slams shut - by onv - 02-12-2012, 08:10 PM



Users browsing this thread: 2 Guest(s)