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!
_Citizenkane
joined
This member has provided no bio about themself...