This member has provided no bio about themself...

Comment History
_Citizenkane
_Citizenkane - - 3 comments @ Autumn Aurora 2

Thanks for your help Vandrerer. I appreciate your quick response. :)

I solved my problem using my idea. Changing the mattress requires a new game, as you say, but changing the script works any time.

As I thought, the problem is that the sleep script checks corpses. If you kill a bandit near the bed it will be broken forever.

To fix, change line 270 to:
if ((IsStalker(obj) and get_npc_relation(obj,db.actor)=="enemy") or IsMonster(obj)) and obj:alive() and obj:position():distance_to(db.actor:position())<ENEMY_RADIUS then

I saw I am not the only person to have this problem - user Warthog3 had same problem before also. Glad I have a solution though. I would not have solved it without your help! Thanks again!

Good karma+1 vote
_Citizenkane
_Citizenkane - - 3 comments @ Autumn Aurora 2

I found the code I was looking for - thank you! It looks like this:

local ENEMY_RADIUS = 15
if ((IsStalker(obj) and get_npc_relation(obj,db.actor)=="enemy") or IsMonster(obj)) and obj:position():distance_to(db.actor:position())<ENEMY_RADIUS then

Changing ENEMY_RADIUS to a low value worked... but that's a bad solution. I don't actually want to sleep if enemies are nearby. I think the REAL problem is there are enemy CORPSES near the bed!

How can I check if the object is alive? Can I just add "and obj:alive()"?

Good karma+1 vote
_Citizenkane
_Citizenkane - - 3 comments @ Autumn Aurora 2

AMAZING MOD! The graphics and sound are incredible - I love the attention to detail. This is by far the best SoC mod I have ever played.

One issue: When I try to sleep in The Garbage, it says there are enemies nearby. I am trying to sleep in the hangar, and there are 5 loners with me. There are enemies by the train tunnel. Can I edit a script so it doesn't check so far for enemies? Which script would I look in?

Good karma+1 vote