Jump to content
⚠ Known Issue: Media on User Profiles ×

jvilleseche

Members
  • Posts

    1
  • Joined

  • Last visited

Nexus Mods Profile

About jvilleseche

jvilleseche's Achievements

Newbie

Newbie (1/14)

  • First Post
  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

0

Reputation

  1. Sorry for the necro of a necro. There are not many results for this in Google so I used this to get started and figured my results may be useful to someone, But not worthy of a new thread. Below is my modified script which attaches directly to beds in CK. Once attached any bed of that type will fire the script either when the bed is used or the player enters the cell. The script checks for update to see if the NPC has woken up, If they are awake it will dress them. In order to re-equip the outfit it is necessary to add and remove an item to the NPC's inventory. I had to use GetForm() for this as I was not able to add the property and have the item actually go into their inventory. I am currently working working on a random selector that will choose from an array of sleeping outfits and add/equip one and remove it from their inventory when they wake up. Scriptname BedActivator extends ObjectReference Actor Sleeper Event OnActivate(ObjectReference akActionRef) Sleeper = (akActionRef as Actor) If ((akActionRef != Game.GetPlayer())) Sleeper.UnEquipAll() RegisterForUpdate(5) EndIf EndEvent Event OnUpdate() If (Sleeper.GetSleepState() != "3") Sleeper.AddItem(Game.GetForm(0x0003CA00), 1, True) Sleeper.RemoveItem(Game.GetForm(0x0003CA00), 1, True) UnregisterForUpdate() EndIf endEvent
×
×
  • Create New...