TheGreenLion Posted November 18, 2012 Share Posted November 18, 2012 I've got a shallow bathing area in my player house with some benches that I plan on having NPCs visit periodically to chill for a few hours. What I was wondering is if there is a way to make them remove any clothing/armor/weapons that they are wearing when they enter this particular area only, and then re-equip what was removed when they leave. It just would seem odd if they decided to take a bath fully clothed. If anyone has a solution for that I'd greatly appreciate some help! :biggrin: Link to comment Share on other sites More sharing options...
acidzebra Posted November 18, 2012 Share Posted November 18, 2012 There are several script elements you could experiment with, perhaps UnequipAll() or RemoveAllItems (which allows you to transfer everything to a container) http://www.creationkit.com/RemoveAllItems_-_ObjectReferencehttp://www.creationkit.com/UnequipAll_-_Actor But yeah, some scripting will be involved, like placing a triggerbox covering the bathing area with a script containing an ontriggerenter() event. http://www.creationkit.com/OnTriggerEnter_-_ObjectReference Link to comment Share on other sites More sharing options...
TheGreenLion Posted November 19, 2012 Author Share Posted November 19, 2012 Thanks for the advice Acid, scripting confuses the daylights out of me so I'll give it a go but I have limited expectations. I guess I'm just anxious to get through that part of it, perhaps anyone with some superior scripting knowledge might be able to help me? It also seems that I can't see my trigger boxes...that's bothersome. :wacko: Link to comment Share on other sites More sharing options...
acidzebra Posted November 19, 2012 Share Posted November 19, 2012 If you can't see ANY markers (idle markers, sit markers, use markers), press M with the render window visible. If you're trying to draw a triggerbox, first select the objects you want to draw the trigger around (like a couple of floor, wall, and other pieces) using the ctrl+left click to select multiple objects, then press the little T/box button from the top menu (looks like a box... with a T in it ;), then select the defaultblanktrigger from the options. It will create a nice box with an area guaranteed to cover the objects you selected. If you try to drag one into your scene (which is a mistake many people make when first working with triggers), it will have dimensions 0,0,0 so that's why you don't see it. Link to comment Share on other sites More sharing options...
TheGreenLion Posted November 19, 2012 Author Share Posted November 19, 2012 Aha! There's that lovely red box I was expecting, now the fun part begins! Thanks Acid, that was driving me nuts lol! :wallbash: Link to comment Share on other sites More sharing options...
acidzebra Posted November 19, 2012 Share Posted November 19, 2012 Here, this will make anyone entering the box go starkers. Scriptname nudityscript extends ObjectReference Event OnTriggerEnter (objectreference triggerRef ) (triggerRef as actor).UnequipAll() EndEvent But they will likely never reequip their armor (although they will equip and draw a weapon if attacked). There should be a way to cycle through all their armor slots, put the data in a temporary array, and then call equipitem() for each removed item on a second eventblock OnTriggerLeave but I don't see a quick 'n easy way to do that. Link to comment Share on other sites More sharing options...
TheGreenLion Posted November 19, 2012 Author Share Posted November 19, 2012 Hmmm, if they had a default outfit they would eventually revert to wearing it I assume. I imagine the character would have to leave the area though. I kind of had the idea from some hunters out in the hot springs by Eldergleam, but they didn't have an inventory or outfits to start with. Link to comment Share on other sites More sharing options...
TheGreenLion Posted November 19, 2012 Author Share Posted November 19, 2012 Hmm tried to make a new script and it gave me this: Starting 1 compile threads for 1 files...Compiling "AATGLBathScript"...<unknown>(0,0): Unable to find flags file: TESV_Papyrus_Flags.flgc:\program files\steam\steamapps\common\skyrim\Data\Scripts\Source\ObjectReference.psc(1,0): Unknown user flag HiddenNo output generated for AATGLBathScript, compilation failed. Batch compile of 1 files finished. 0 succeeded, 1 failed.Failed on AATGLBathScript Guess I'll have to see about it tomorrow sometime. Bleh, lol. Link to comment Share on other sites More sharing options...
IsharaMeradin Posted November 19, 2012 Share Posted November 19, 2012 might be able to use OnTriggerLeave() and utilize thishttp://www.creationkit.com/Reset_-_ObjectReferenceand reset the actor to a specific marker set just on the outside of the trigger box... hopefully the player doesn't see that happen & hopefully their AI doesn't make 'em turn around and do it all over again... Link to comment Share on other sites More sharing options...
TheGreenLion Posted November 19, 2012 Author Share Posted November 19, 2012 Well fixed the compile problem by verifying the cache, think some operator error happened there, lol. I'll have to give it a test after work, the AI will be easy...might have to fiddle with marker placement with the idea you gave me Ishara, but it sounds like a good idea. Link to comment Share on other sites More sharing options...
Recommended Posts