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
problem with monsters and sanity
darksky Offline
Member

Posts: 52
Threads: 8
Joined: Nov 2012
Reputation: 2
#1
problem with monsters and sanity

hi
i have 2 problems with monsters in my custom story.
1. problem: i don't want the player to lose sanity when looking at monsters. in the wiki it says
Quote:void SetSanityDrainDisabled(bool abX);



Enables/Disables sanity drain from darkness, monsters, etc
however, it does not work for me. i tried different ways but nothing worked.
void OnStart()
{
    AddTimer("t1",1,"sanitydrain");
    SetSanityDrainDisabled(true);    
}

void sanitydrain(string &in asTimer){
    SetSanityDrainDisabled(true);
    AddDebugMessage("no sanity drain", false);
}


////////////////////////////
// Run when entering map
void OnEnter()
{
    SetSanityDrainDisabled(true);
}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}


2. problem: i want a monster to spawn with his back facing a wall. in the level editor everything looks fine
but ingame the monster is looking at the wall.

how can i solve these problems?
11-16-2012, 03:43 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#2
RE: problem with monsters and sanity

The problem with the monster is that the monster starts the game, in its default position.

What i think you can do is. copy the monster to your CS, open it in the Model Editor, rotate it, save it

Trying is the first step to success.
11-16-2012, 04:38 PM
Find
Statyk Offline
Schrödinger's Mod

Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation: 241
#3
RE: problem with monsters and sanity

1) putting a blockbox between you and the monster stops sanity drain, if that works for you. the sanity drain is hard coded into the enemy type. I'm not sure if someone has come up with a solution yet. the SetSanityDrainDisabled function is only to have the player not lose sanity in darkness.

2) animations and monster type coding force the monster to face a certain direction no matter how you rotate him. if need be, add a pathnode for him to turn to right as he spawns and have him stay there awhile. that will make him turn. other than that, you would need to do clever mapping.
(This post was last modified: 11-16-2012, 05:04 PM by Statyk.)
11-16-2012, 05:03 PM
Find
darksky Offline
Member

Posts: 52
Threads: 8
Joined: Nov 2012
Reputation: 2
#4
RE: problem with monsters and sanity

well, for number 2 I changed the map so that the monster will show up right.

using block boxes would be enough for me but... I tried block_box and block_box_nonchar but it did not work Sad
11-16-2012, 06:13 PM
Find




Users browsing this thread: 1 Guest(s)