Jump to content

[LE] Making Male Modesty Mod, Having Issue with Scripting


Recommended Posts

So, I finally figured out how to make animations in Blender after months of searching and seeing that there are so few male mods in general I wanted to address that problem. I have an idea of how I want it to go but sadly am getting compilation errors from what probably is to most people an easy fix. LBG_AnimationScript.psc(31,19): int is not a known user-defined type

 

 

Basically, I have a variable set up to detect if the player is wearing body armor, then have it set to one or zero based on that. Then, if the variable is true, play the idle animation constantly. Not sure if this is best way to go about it, but after looking at the CK site I couldn't get WornHasKeyword to work so I'm settling for this. Also, haven't set the gender flag because I just want to see if the animation will play at all for the moment. I want it to be a random chance of two I've made, but for now I just want to get it working. The solution is probably very simple.

Scriptname LBG_AnimationScript extends Quest  

GlobalVariable Property LBG_Naked Auto
FormList Property LBG_ArmorList Auto
FormList Property LBG_ClothingList Auto
Idle Property ENM_Idle1 Auto

Function ArmorCheck()
If Game.GetPlayer().IsEquipped(LBG_ArmorList)
Debug.Trace("Player is wearing armor.")
LBG_Naked.SetValue(0)
EndIf
If Game.GetPlayer().IsEquipped(LBG_ClothingList)
Debug.Trace("Player is wearing clothes.")
LBG_Naked.SetValue(0)
EndIf
If !Game.GetPlayer().IsEquipped(LBG_ArmorList)
Debug.Trace("Player is NOT wearing armor.")
LBG_Naked.SetValue(1)
EndIf
If !Game.GetPlayer().IsEquipped(LBG_ClothingList)
Debug.Trace("Player is NOT wearing clothes.")
LBG_Naked.SetValue(1)
EndIf
EndFunction

Function NakedTest()

Int  NakedStatus = LBG_Naked.GetValueInt()
	
	While NakedStatus.GetValueInt(1)
		Game.GetPlayer().PlayIdle(ENM_Idle1)
		Debug.Trace("The Idle is Playing")
	EndWhile
EndFunction

Link to comment
Share on other sites

In order to compile, this:

 

Function NakedTest()

Int  NakedStatus = LBG_Naked.GetValueInt()
	
	While NakedStatus.GetValueInt(1)
		Game.GetPlayer().PlayIdle(ENM_Idle1)
		Debug.Trace("The Idle is Playing")
	EndWhile
EndFunction

 

 

should be changed to this:

 

 

Function NakedTest()
  Int NakedStatus = LBG_Naked.GetValueInt()
  While NakedStatus.GetValueInt() == 1
    Game.GetPlayer().PlayIdle(ENM_Idle1)
    Debug.Trace("The Idle is Playing")
  EndWhile
EndFunction 

 

 

 

I am hoping that you have a separate script somewhere that is calling these functions as necessary. As it stands, even if it compiles, the script will do nothing.

Link to comment
Share on other sites

Ok, I think I get what you did there. As for calling it, not yet. I want to figure out the best way of doing so without causing possible bloat? Like...I'm hoping the idle will stay with the globalvariable set as is. Then I'll just call it when the player equips/unequips body armor or clothing?

Link to comment
Share on other sites

There's already two mods that do this without using scripts (though one technically only works for female characters). They both use DAR, which I believe is now the go-to for animation mods:

 

https://www.nexusmods.com/skyrim/mods/102001?tab=description (EVG conditional idles)

 

This next is female-only, but it doesn't require an ESP.

 

https://www.nexusmods.com/skyrim/mods/102290?tab=posts (DAR modesty cover yourself)

Link to comment
Share on other sites

I have those. I've already tried putting my own animations in there to try and get what I want here. I couldn't get them to work, so I figured I'd make my own and if I wanted to expand upon it I could do so without needing permissions. I wante it to also switch between two cover animations I have made, not just one. I also saw advanced cover, which is a neat idea but wouldn't totally make sense for a cis male character lol.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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