Jump to content

(Solved) Scripting problem: 0 animation found


Recommended Posts

Posted

Hello!

 

I have a problem with a script using SexlabFramework:
 

actor[] sexActors = new actor[2]
sexActors[0] = PlayerRef
sexActors[1] = Akspeaker
sslBaseAnimation[] anims = SexLab.GetCreatureAnimationsByRaceKeyTags(2, "Troll", "Blowjob" )
Debug.Notification("Troll Blowjob: "+anims.length)
SexLab.StartSex(sexActors, anims)

the anims array returned by SexLab.GetCreatureAnimationsByRaceKeyTags(2, "Troll", "Blowjob" ) is empty

everything else compiles and works fine, and I have matching animations in game.

Any idea what I could be missing here?

Posted

Are you sure Troll is a valid RaceKey?

I never fill that manually so I'm not sure, but if in doubt try getting the correct RaceKey from SexLab itself

 

String raceID = MiscUtil.GetActorRaceEditorID(Akspeaker)
String raceKey = sslCreatureAnimationSlots.GetRaceKeyByID(raceID)
sslBaseAnimation[] anims = SexLab.GetCreatureAnimationsByRaceKeyTags(2, raceKey, "Blowjob")

 

Posted

Thank you for the info ! I lack experience with skyrim scripting... So here is the code now:

Debug.Notification("BEGIN")
actor[] sexActors = new actor[2]
sexActors[0] = PlayerRef
sexActors[1] = Akspeaker

String raceID = MiscUtil.GetActorRaceEditorID(Akspeaker)
Debug.Notification("raceID: "+raceID)

String raceKey = sslCreatureAnimationSlots.GetRaceKeyByID(raceID) 
Debug.Notification("raceKey: "+raceKey)

sslBaseAnimation[] anims = SexLab.GetCreatureAnimationsByRaceKey(2, raceKey)
Debug.Notification("animations: "+anims.length)
SexLab.StartSex(sexActors, anims)
Debug.Notification("END")

I get the raceID: TrollFrostRace

and the raceKey: Trolls

But even with that, SexLab.GetCreatureAnimationsByRaceKey(2, raceKey) returns an empty array...

Any other idea? ^^
 

Posted

Double check creatures are active in SexLab.

Your script looks like a dialogue script.

Be sure your trolls can speak, usually they do not.

 

And check in SexLab itself if you have actual anims for trolls.

 

Install MNC, just in case.

And remember to refresh the SexLab registry.

Posted

Thanks for your help!

Creatures are active in Sexlab, and I can start Trolls animations with the match maker mod.

It is indeed a dialog script, I'm trying to make a troll follower.

For now I gave him an orc voice type to allow dialog.

It works, it is how I get my debug notifications.

I tried some other functions to get more debug infos:
 

Debug.Notification("BEGIN")
actor[] sexActors = new actor[2]
sexActors[0] = PlayerRef
sexActors[1] = Akspeaker

String raceID = MiscUtil.GetActorRaceEditorID(Akspeaker)
Debug.Notification("raceID: "+raceID)

String raceKey = sslCreatureAnimationSlots.GetRaceKeyByID(raceID) 
Debug.Notification("raceKey: "+raceKey)

sslBaseAnimation[] anims = SexLab.GetCreatureAnimationsByRaceKey(2, raceKey)
Debug.Notification("animations: "+anims.length)
Debug.Notification("has animations: "+SexLab.HasCreatureRaceKeyAnimation(raceKey))

anims = new sslBaseAnimation[1]
anims[0] = SexLab.GetAnimationByName("(Troll) Laying Blowjob")
Debug.Notification("animation: "+anims[0])

Debug.Notification("total animation count: "+SexLab.GetAnimationCount())

SexLab.StartSex(sexActors, anims)
Debug.Notification("END")

The named animation is currently active, but SexLab.GetAnimationByName returns None.

Even worse, SexLab.GetAnimationCount() returns 0 !

Archived

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

  • Recently Browsing   0 members

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