Frictional Games Forum (read-only)

Full Version: Player doesn't drain sanity from darkness
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Okay, I'm making a map where it's dark but the player doesn't drain sanity and I have no idea how to do that. Can someone help me ?

EDIT : I want the player doesn't drain sanity by darkness
If you're asking how to disable sanity draining from the darkness, just call the SetSanityDrainDisabled() function from OnEnter():

PHP Code:
void OnEnter()
{
    
SetSanityDrainDisabled(true);

    
// other stuff may go here...

(01-21-2013, 10:53 AM)TheGreatCthulhu Wrote: [ -> ]If you're asking how to disable sanity draining from the darkness, just call the SetSanityDrainDisabled() function from OnEnter():

PHP Code:
void OnEnter()
{
    
SetSanityDrainDisabled(true);

    
// other stuff may go here...

Hey, a little of the topic, I've tried that script several times and it just keeps draining sanity. What do you think the problem is ?
(01-21-2013, 01:48 PM)amusei Wrote: [ -> ]
(01-21-2013, 10:53 AM)TheGreatCthulhu Wrote: [ -> ]If you're asking how to disable sanity draining from the darkness, just call the SetSanityDrainDisabled() function from OnEnter():

PHP Code:
void OnEnter()
{
    
SetSanityDrainDisabled(true);

    
// other stuff may go here...

Hey, a little of the topic, I've tried that script several times and it just keeps draining sanity. What do you think the problem is ?
Yeah I got the same problem
I think the only way to stop this sanity draining is making a full conversion. Although I'm sure Your Computer or Statyk will answer better to this.
I'm making the player when he enters an area he doesn't drain his sanity in that area. When he leaves that area, he can drain his sanity again
From what I've seen, it works (darkens doesn't drain) when there are no monsters around, or when the monsters are initially unaware of your presence; it wont, however, stop sanity drain caused by looking at a monster.

If there are monsters behind obstacles, at unreachable places, then you can put a plane with a completely transparent texture in front of them (just make sure it's facing the right way) which will stop the engine from detecting that the Player is looking at an enemy, and then you can use collide callbacks and timers to simulate sanity drain when the player is in a specific area.
Never mind. It works now
I maybe misunderstood the Problem, but didn't you have the question why the player does _not_ drain sanity in the dark? (and the answers told you how to disable sanitydrain […in the dark…])
Because i'm running in the same problem…i can walk around in the dark, the hint about darkness can decrease sanity appears…and nothing happens. So the function of draining sanity in the dark does not work. in your first post it sounds like you would have the same problem…or not?
If yes, how did you solve this?
I'm bad at English, especially at grammars. The topic was about how to disable sanity from darkness
Pages: 1 2