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
Script Help Player doesn't drain sanity from darkness
No Author Offline
Posting Freak

Posts: 962
Threads: 10
Joined: Jun 2012
Reputation: 13
#1
Player doesn't drain sanity from darkness

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

[Image: the-cabin-in-the-woods-masked-people.jpg]
(This post was last modified: 01-24-2013, 10:10 AM by No Author.)
01-21-2013, 10:16 AM
Find
TheGreatCthulhu Offline
Member

Posts: 213
Threads: 10
Joined: Oct 2010
Reputation: 32
#2
RE: Player doesn't drain sanity from darkness

If you're asking how to disable sanity draining from the darkness, just call the SetSanityDrainDisabled() function from OnEnter():

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

    
// other stuff may go here...

(This post was last modified: 01-21-2013, 10:53 AM by TheGreatCthulhu.)
01-21-2013, 10:53 AM
Find
amusei Offline
Junior Member

Posts: 23
Threads: 8
Joined: Aug 2012
Reputation: 2
#3
RE: Player doesn't drain sanity from darkness

(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: (Select All)
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
Find
No Author Offline
Posting Freak

Posts: 962
Threads: 10
Joined: Jun 2012
Reputation: 13
#4
RE: Player doesn't drain sanity from darkness

(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: (Select All)
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

[Image: the-cabin-in-the-woods-masked-people.jpg]
01-21-2013, 02:01 PM
Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#5
RE: Player doesn't drain sanity from darkness

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.

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
01-21-2013, 02:19 PM
Find
No Author Offline
Posting Freak

Posts: 962
Threads: 10
Joined: Jun 2012
Reputation: 13
#6
RE: Player doesn't drain sanity from darkness

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

[Image: the-cabin-in-the-woods-masked-people.jpg]
01-21-2013, 03:11 PM
Find
TheGreatCthulhu Offline
Member

Posts: 213
Threads: 10
Joined: Oct 2010
Reputation: 32
#7
RE: Player doesn't drain sanity from darkness

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.
01-21-2013, 05:38 PM
Find
No Author Offline
Posting Freak

Posts: 962
Threads: 10
Joined: Jun 2012
Reputation: 13
#8
RE: Player doesn't drain sanity from darkness

Never mind. It works now

[Image: the-cabin-in-the-woods-masked-people.jpg]
01-22-2013, 04:03 AM
Find
nivramm Offline
Junior Member

Posts: 18
Threads: 1
Joined: Jan 2013
Reputation: 0
#9
RE: Player doesn't drain sanity from darkness

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?
01-23-2013, 02:54 PM
Find
No Author Offline
Posting Freak

Posts: 962
Threads: 10
Joined: Jun 2012
Reputation: 13
#10
RE: Player doesn't drain sanity from darkness

I'm bad at English, especially at grammars. The topic was about how to disable sanity from darkness

[Image: the-cabin-in-the-woods-masked-people.jpg]
01-23-2013, 03:03 PM
Find




Users browsing this thread: 3 Guest(s)