Jump to content

SetOutfit Code and Clipping (Fixed)


kxdace

Recommended Posts

Posted

Hello Friends!

I create a mod that uses quest dialogs to change the outfits for a character based off of choices (Battle Outfit \ Sleep Outfit \ Etc).

Most of the outfits work great but I have one outfit that contains socks and shoes as different clothing items and when I chose that option they both display clipping through each other.

When I put them on as the player character they work fine it only happens when I use the set outfit code on a NPC.

Is this a known bug?

If so I guess I could create a delayed script code... something like NPC.equipitem(sock)... wait 5 seconds NPC.equipitem(shoe).

No biggie if this is the only way but it seems kind of a round about way of doing it, but then again there seem to be a ton of round about ways of doing "simple" tasks in creation kit lol.

Posted

I know of no reason why changing outfit through script would cause clipping anymore than it would if added permanently through npc edit. Seems like the clipping problem must always be there or never, and if something fits your pc but not npc two reasons I know this to happen is weight slider is missing or disabled but you don't notice due to your characters weight being close enough, or the outfit fits your pc because it was built with body morphs but these will not apply on npc in this way.

Posted

Yeah its a strange duck...

 

The only solution that works is setting the outfit.... waiting a sec then disabling the NPC waiting a sec and re-enabling them.

 

Don't know why just setting a new outfit causes the close to clip through but this fixes the issue so whatever,

 

I gave up on CK making sense a long time ago and now just go with it.

 

I provided the code for what works vs what didn't work so other users can benefit.

 

Thanks for the quick reply I love the LL community is awesome.!

 

===Attempt 1====

Didn't work socks and underwear clipped through clothes.

 

    Actor akSpeaker = akSpeakerRef as Actor
    akSpeaker.setOutfit(selOutfit)

 

 

===Attempt 2===

Same issue....

 

;     akSpeaker.EquipItem(itemSock)
;     utility.wait(1.0)
;     akSpeaker.EquipItem(itemUnderP)
;     utility.wait(1.0)
;     akSpeaker.EquipItem(itemCuirass)
;     utility.wait(1.0)
;     akSpeaker.EquipItem(itemGloves)
;     utility.wait(1.0)
;     akSpeaker.EquipItem(itemBoots)
;     utility.wait(1.0)
;     akSpeaker.EquipItem(itemGlasses)
;     utility.wait(1.0)
;     akSpeaker.EquipItem(itemNeck)

 

 

 

===Attempt 3 Works===

Great Success!!!

 

    Actor akSpeaker = akSpeakerRef as Actor


    akSpeaker.setOutfit(selOutfit)

 

     utility.wait(1.0)
     akSpeaker.disable()


     utility.wait(1.0)
     akSpeaker.enable()

 

 


 

 

 

Posted

Pardon my ignorance but would that be a function I run on an actor after I apply the new outfit?

 

For example:

 

akSpeaker.setOutfit(selOutfit)

akSpeaker.updateModelWeight()

 

 

Posted

Finally had some time to test this out.

I tried using:

 

akSpeaker.UpdateModelWeight()

Error: UpdateModelWeight is not a function or does not exist

 

I also tried the following method:

akSpeaker.NiOverride.UpdateModelWeight()

Error: the type name NiOverride cannot be used as a property

 

I'm guessing this is because I have to import the NiO library.

I try to do this the same way I do with Sexlab but I don't get any options in the properties drop down menu to choose NiOverride.

 

EndFunction

    Outfit Property selOutfit  Auto
    ;NiOverride Property nOver Auto

    Armor Property itemSock  Auto  
    Armor Property itemUnderP  Auto  
    Armor Property itemCuirass  Auto  
    Armor Property itemGloves  Auto  
    Armor Property itemBoots  Auto  
    Armor Property itemGlasses  Auto  
    Armor Property itemNeck  Auto  

 

Please advise.

 

 

 

 

 

 

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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