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
Force player to look somewhere
naseem142 Offline
Member

Posts: 153
Threads: 19
Joined: Oct 2012
Reputation: 0
#6
RE: Force player to look somewhere

(10-12-2012, 02:43 PM)The chaser Wrote: But, what's your problem? It doesn't look, it doesn't stop looking?
Also, that's a good thread.

If you want it to stop looking, use

StopPlayerLookAt();

If you want it to look somewhere, it should be like this:


void OnStart ()
{
AddEntityCollideCallback("Player", "ScriptArea", "Lookat", true, 1);
}

void Lookat (string &in asParent, string &in asChild, int alState);
{
StartPlayerLookAt("AreaLookAt", 2, 2, "");
}
The script is easy , but the timer stuff is just complicated for me. ( as a newbie it gave me a headache Undecided )
so i wont do it anymore , it wasn't necessary for my custom story though it was just a bonus. Shy
But since your here , can you help me with this door-slam script?
I have no idea whats wrong with it , it looks perfect!


( I cut it out of my script so i wont need to post everything else Smile )



Door name: doorman
Script area name: slamdoor


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

void func_slam(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("doorman", 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);
}
(This post was last modified: 10-12-2012, 02:55 PM by naseem142.)
10-12-2012, 02:53 PM
Website Find


Messages In This Thread
Force player to look somewhere - by naseem142 - 10-12-2012, 01:26 PM
RE: Force player to look somewhere - by Robby - 10-12-2012, 01:57 PM
RE: Force player to look somewhere - by naseem142 - 10-12-2012, 02:35 PM
RE: Force player to look somewhere - by Lizard - 10-12-2012, 02:34 PM
RE: Force player to look somewhere - by naseem142 - 10-12-2012, 02:53 PM
RE: Force player to look somewhere - by naseem142 - 10-12-2012, 03:07 PM
RE: Force player to look somewhere - by naseem142 - 10-12-2012, 04:28 PM



Users browsing this thread: 7 Guest(s)