Jump to content

Sexlab Papyrus Script Start Animation By Name


Recommended Posts

Does anyone know how to do this? I figured out how to do tags, but I'm not sure how to start an animation by the name. Here is what I've done so far. Also, is it supposed to be the ID or the Name? i"ve tried both by finding it in the json file but it simply doesn't work.

 

actor[] sexActors = new actor[2]
sslBaseAnimation[] anims

sexActors[1] = Alias_Athis.GetActorReference()
sexActors[0] = Alias_Njada.GetActorReference()
anims[0] = SexLab.GetAnimationByName("BaboBackHugPressure01")
SexLab.StartSex(sexActors, anims)

Link to comment

You may want to initialize your "anims" variable.

I use getAnimationByRegistry instead of by-name, but otherwise that's how I do it.

 

	sslbaMain[0] = SexLab.getAnimationByRegistry( "LeitoBlowjob")
	sslThreadModel th = SexLab.NewThread()
	th.AddActors( actors)
	th.CenterOnObject( actor1)
	th.DisableLeadIn( True)
	th.SetAnimations( sslbaMain)
	if th.StartThread()

 

Link to comment
13 hours ago, pfB6cs said:

You may want to initialize your "anims" variable.

I use getAnimationByRegistry instead of by-name, but otherwise that's how I do it.

 

	sslbaMain[0] = SexLab.getAnimationByRegistry( "LeitoBlowjob")
	sslThreadModel th = SexLab.NewThread()
	th.AddActors( actors)
	th.CenterOnObject( actor1)
	th.DisableLeadIn( True)
	th.SetAnimations( sslbaMain)
	if th.StartThread()

 

Do you just copy that entire thing and paste it in there? I'm not to sure how to use that for mulitple actors. I have four scenes running at the same time.

Link to comment
This is pretty much what you are already doing. I am setting a few config options more explicitly than you are but I doubt it makes any differences. I did not show how I fill the actor array, nor all the details of how I pick animations in my actual code, but you seem to be on top of that.

If your code is not working, I suspect it's because you did not properly initialize the "anims" array. You seem to be missing:
anims = new sslBaseAnimation[1]
before
anims[0] = SexLab.getAnimationByName( "...")

If you want to run four scenes in parallel, just repeat the code sequence four times.

Note however that this method bypasses some sanity checks. It will take your actor array as-is, without checking your animation's sex requirements. It may also fail to notice that your actors are already busy in a sex scene, placing the same actor in two animations at once. This can lead to broken animations and other strange conflicts.

I'd recommend using getAnimationByRegistry and using the animation ID, instead of getAnimationByName. The ID is what SL uses internally to register the animation and this is guaranteed to be unique. Animation names are not necessarily unique, though I doubt there are actual conflicts (so feel free to ignore my recommendation).
Link to comment
18 hours ago, pfB6cs said:

This is pretty much what you are already doing. I am setting a few config options more explicitly than you are but I doubt it makes any differences. I did not show how I fill the actor array, nor all the details of how I pick animations in my actual code, but you seem to be on top of that.

If your code is not working, I suspect it's because you did not properly initialize the "anims" array. You seem to be missing:
anims = new sslBaseAnimation[1]
before
anims[0] = SexLab.getAnimationByName( "...")

If you want to run four scenes in parallel, just repeat the code sequence four times.

Note however that this method bypasses some sanity checks. It will take your actor array as-is, without checking your animation's sex requirements. It may also fail to notice that your actors are already busy in a sex scene, placing the same actor in two animations at once. This can lead to broken animations and other strange conflicts.

I'd recommend using getAnimationByRegistry and using the animation ID, instead of getAnimationByName. The ID is what SL uses internally to register the animation and this is guaranteed to be unique. Animation names are not necessarily unique, though I doubt there are actual conflicts (so feel free to ignore my recommendation).

That fixed the issue, thank you.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use