Jump to content

Sleeping outfits


tonyis59

Recommended Posts

jvilleseche, if I may necro a necro of a necro: Did you get that working? If not, has anyone figured out if various "undress to get in the pool/bath" scripts from nudie mods can be adapted to this? It IS kind of stupid that all these NPCs have sleep outfits defined, then go to bed in their plate armor. Hopefully there's just some mod to fix this, but for the follower mod I'm working on, I would like to build this feature in as a script so it's not dependent on someone having a particular mod.

Link to comment
Share on other sites

  • 10 months later...

As far as making use of the "Sleep outfit", this is impossible as of yet. there is a script to SET the outfit, but not get, which is stupid. However, there is a very simple script I made to make your own setup. Just attach this script to any REFERENCEALIAS, and set your properties. In the "Outfits" property, slot 0 is for the normal outfir, slot 1 is for sleeping outfit.

Outfit[] Property Outfits Auto
{0: Normal outfit; 1: Sleep outfit;}
Bool Ptoperty DidSleepOutfit = False Auto Hidden

Event OnSit(ObjectReference akFurniture)
	Utility.wait(1.0)
	Actor Me = GetActorReference()
	If (Me.GetSleepState() == 3)
		Form L = Me.GetEquippedObject(0) ; Check Left Hand
		Form R = Me.GetEquippedObject(1) ; Check Right Hand
		Debugger("GetSleepState: "+Me.GetSleepState())
		If L && (L as Weapon)
			Me.UnequipItem(L as Weapon) 
		EndIf
		If R && (R as Weapon)
			Me.UnequipItem(R as Weapon) 
		EndIf
		Me.SetOUtfit(Outfits[1])
		DidSleepOutfit = True
	EndIf
EndEvent

Event OnGetUp(ObjectReference akFurniture)
	If (DidSleepOutfit)
		DidSleepOutfit = False
		Utility.wait(3.0)
		GetActorReference().SetOUtfit(Outfits[0])
	EndIf
EndEvent
Edited by schak123
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...