NPC sleep - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: Script Help (/Forum-Script-Help) +--- Thread: NPC sleep (/Thread-NPC-sleep) |
NPC sleep - Nachtmusique - 08-22-2014 03:23 PM I'd like to make an npc go to sleep and then wake up. the sleep function has some odd behavior on npcs. It acts like it will work, creating the "corpse" and hiding the npc, but then the hidden npc dies creating a second corpse. Does anyone have a script for this? RE: NPC sleep - Nachtmusique - 08-25-2014 02:28 AM Just to be clear, I am talking about the default built-in sleep function. It works fine for players, but not for npcs. Does anyone have a good idea of how to make it work for npcs? RE: NPC sleep - dagger4k - 08-25-2014 11:41 PM what are you actually trying to do here? Somone uses a musical instrument and the npc falls asleep??? if you give an explanation you will get an answer RE: NPC sleep - Nachtmusique - 08-26-2014 10:29 PM I have several applications in mind. Music is a good example, also having a sleeping npc that players ate trying to sneak past, knock out abilities in combat, etc. I just want a way to make a function for npcs that operates the same way SLEEP does for player characters. With sleep players can immediately move again if they choose to, so I assume I would need to STONE the npc to keep it asleep until I want it to wake up. Depending on the application I could then remove stone to allow the npc to wake up. The problem is that .sleep is bugged for npcs. It creates the corpse, hides the npc, then the hidden npc just dies and creates a second corpse. RE: NPC sleep - Extreme - 08-27-2014 01:44 AM Try speedmode 3 or 4 on npcs, it maybe block them to walk. Or tag.nomovetill.. Or freezing them with statf_freeze instead stone. RE: NPC sleep - Ben - 08-27-2014 08:54 AM Found the bug and fixed it. Also made sure that NPCs can't move if sleeping to prevent them from waking up right away. Using "REVEAL statf_sleeping" will wake the NPC. This fix will only show up in tomorrow night's nightly build. RE: NPC sleep - Nachtmusique - 08-27-2014 09:32 PM Excellent! |