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
Point-light going through walls fix?
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#8
RE: Point-light going through walls fix?

You can add a script area with a StartPlayerLookAt callback. Basically start forcing them to look at it, but stop them immediately after. Use this opportunity to add a callback for when they look at it. Run the sanity script within the callback function.

PHP Code: (Select All)
void OnStart()
{
    
StartPlayerLookAt("ScriptArea"0.0f0.0f"LookCallback");
    
StopPlayerLookAt();
}

void LookCallback()
{
    
GiveSanityDamage(25.0ftrue);


I'm unsure if the stop line will also remove the callback. I'm also not sure if the callback is removed upon being called, so the event might happen continuously while looking at it. It has an easy fix though; just add a variable check.

09-22-2015, 11:47 PM
Find


Messages In This Thread
Point-light going through walls fix? - by Kyzer - 09-22-2015, 08:45 PM
RE: Point-light going through walls fix? - by Mudbill - 09-22-2015, 11:47 PM



Users browsing this thread: 1 Guest(s)