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
Causing sanity damage to yourself
Armored Cow Offline
Member

Posts: 72
Threads: 3
Joined: Sep 2010
Reputation: 0
#9
RE: Causing sanity damage to yourself

I would make a function that sets the player to look at an area as well as play a sound at that area when the player steps into the trigger area. Also include in the function a timer, maybe 3 seconds, that then triggers a function to stop the player looking.

void Onstart()
{
AddEntityCollideCallback("Player", "trigger_area", "Look", true, 1);
}

void Look(string &in asParent, string &in asChild, int alState)
{
AddTimer("", 3.0f, "StopLook");
PlaySoundAtEntity("", "squeal.snt", "area_squeal", 0, false); //area_squeal is the area you make for the sound to appear at
StartPlayerLookAt("area_squeal", 2, 3, "");
GiveSanityDamage(15.0f, true);
}

void StopLook(string &in asTimer)
{
StopPlayerLookAt();
}
09-17-2010, 09:11 PM
Find


Messages In This Thread
Causing sanity damage to yourself - by RaptorRed - 09-17-2010, 06:24 AM
RE: Causing sanity damage to yourself - by jens - 09-17-2010, 06:54 AM
RE: Causing sanity damage to yourself - by jens - 09-17-2010, 08:28 AM
RE: Causing sanity damage to yourself - by Armored Cow - 09-17-2010, 09:11 PM
RE: Causing sanity damage to yourself - by jens - 09-20-2010, 07:41 AM
RE: Causing sanity damage to yourself - by jens - 09-21-2010, 06:19 AM



Users browsing this thread: 1 Guest(s)