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?
Kyzer Offline
Junior Member

Posts: 17
Threads: 6
Joined: Sep 2015
Reputation: 0
#1
Point-light going through walls fix?

I know a point light is omnidirectional and bla bla, I just wanna know how to stop this from happening. Pointlight seems to be the only light entity that is useful for candles and torches.
09-22-2015, 08:45 PM
Find
Mudbill Offline
Muderator

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

I don't think there actually is a fix. I think point lights just aren't affected by the world and so it's an issue with the engine. You could try using a spot light instead with shadows enabled. Perhaps that would work better. I think you can get a similar result to a point light if you place more of them with different rotations.

(This post was last modified: 09-22-2015, 09:45 PM by Mudbill.)
09-22-2015, 09:45 PM
Find
Kyzer Offline
Junior Member

Posts: 17
Threads: 6
Joined: Sep 2015
Reputation: 0
#3
RE: Point-light going through walls fix?

(09-22-2015, 09:45 PM)Mugbill Wrote: Snip goes the scissors

I got an effect I liked by making a massive boxlight and making the pointlights smaller

how do i make something when the player looks at it their sanity goes down?
like in the story when you look at certain things your character gasps and the screen goes through some kind of fov change
09-22-2015, 10:16 PM
Find
Mudbill Offline
Muderator

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

GiveSanityDamage(25.0f, true); should do just that. The number is sanity damage amount and the boolean is the effect.

(This post was last modified: 09-22-2015, 10:25 PM by Mudbill.)
09-22-2015, 10:25 PM
Find
Kyzer Offline
Junior Member

Posts: 17
Threads: 6
Joined: Sep 2015
Reputation: 0
#5
RE: Point-light going through walls fix?

(09-22-2015, 10:25 PM)Mugbill Wrote: GiveSanityDamage(25.0f, true); should do just that. The number is sanity damage amount and the boolean is the effect.

So an examine area? where do i put this?
09-22-2015, 10:32 PM
Find
Mudbill Offline
Muderator

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

Who said anything about an examine area?

No, just run this line and it will happen to the player.

09-22-2015, 10:48 PM
Find
Kyzer Offline
Junior Member

Posts: 17
Threads: 6
Joined: Sep 2015
Reputation: 0
#7
RE: Point-light going through walls fix?

(09-22-2015, 10:48 PM)Mugbill Wrote: Who said anything about an examine area?

No, just run this line and it will happen to the player.

I want it to happen when they look in the general area of some decals I placed

How would I do that
09-22-2015, 11:10 PM
Find
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
Statyk Offline
Schrödinger's Mod

Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation: 241
#9
RE: Point-light going through walls fix?

Isn't there an entry in the script areas for lookat callbacks? You could put the title in there and just have

void LookCallback()
{
GiveSanityDamage(25.0f, true);
}

somewhere in the script itself. It probably won't end the command like Mugbill says, but if it does, give this a try.
09-23-2015, 12:37 AM
Find
Kyzer Offline
Junior Member

Posts: 17
Threads: 6
Joined: Sep 2015
Reputation: 0
#10
RE: Point-light going through walls fix?

(09-22-2015, 11:47 PM)Mugbill Wrote: Sniped

Does this force the player to look at it? thats not necessarily what i want

I'm looking for something for when the player looks at something it happens, like when they open the door and see the gore.
(This post was last modified: 09-23-2015, 12:53 AM by Kyzer.)
09-23-2015, 12:39 AM
Find




Users browsing this thread: 1 Guest(s)