Jump to content

How to start one animation (sexlab frame work script) with the animation name only?


Recommended Posts

Posted

Hi sorry to ask another question same day...  ?

At current I use 2 sexlabframework funciton. to start animation (with tag or no tag)

 

1.  Sexlab.Quickstart(AkSpeaker, PlayerRef)   (it may start non aggressive animation only right?)

 

2.  SexLab.StartSex(acts, anims, Victim=akSpeaker)   ; anims are already set by  tags which I selected in MCM... (require all type)

 

Then what I hope to know is,, start animation , which only use one Animation name..

I could show UiLib list, and can select, then can get one animation name (which I need ), but I did not know how to use the one animation name then start the animation...

my current code is like that.. (so my script is simple,, then attach the code where I start animation with options. )

 

Spoiler
if atag[0]=="notag"
    Sexlab.Quickstart(AkSpeaker, PlayerRef)
    Debug.MessageBox("start normal animation!!!")
else
    int x = 1
    tagnames = atag[0]
    while(x <=4 && atag[x] != "notag")
        tagnames = tagnames + "," + atag[x]
        x = x+1
    Endwhile
    Debug.MessageBox("selected tags>>" + tagnames)
    sslBaseAnimation[] anims = SexLab.GetAnimationsByTags(2, tagnames, RequireAll=True)
    if ToggleFlag == false
        SexLab.StartSex(acts, anims, Victim=akSpeaker)
        Debug.MessageBox("start tag animation!!!")
    Else
        String [] Animnames = AnimSlots.GetNames(anims) 
        Debug.MessageBox("show animlist>>" + animnames)
        UILIB_1 UILib = ((Self as Form) as UILIB_1)
        int aidx = UIlib.ShowList("Select animation!!", Animnames, 0, 0)
        sslBaseAnimation[] sanim
        sanim[0] = sexlab.GetAnimationByName(animnames[aidx])
        SexLab.StartSex(acts, sanim, Victim=akSpeaker)
        Debug.MessageBox("start >>" + animnames[aidx] +" animation!!!")
    endif
endif

 

 

when I first test it seems work.. but I notice,, it after all not set only one animation, but actually it set anims[0] as animation which I selected with name..

(I could confirm the anims[0] correctly set with my selection)

 

so when start sex... it seems rondom choose..... I suppose my way to set sslBaseAnimation[] is somehow wrong.. or I should use another sexlab function, which not make sslBaseAniamtion[] (array animation)... but I do not know correct way...

at same time I hope to know how I can clean remove un-necessary sslBaseAnimation[] ...

 

  in this code.. I set  2 sslBaseAnimation[] 

One is as anims,,, ( anims is used to get animation from tags,, and I re-use it to get animation list , then if not use listmenu, I simply use it as arg of StartSex()

2nd is as sanim ,, then I do not know formal way.. to set one animation which I already get by sexlab.GetAnimationByName(animnames[aidx])

 

Though I check source file.. then the sexlab.GetAnimationByName( )  return one animation... so I set it as sanim[0]  >>>> it seems not work.. or I should not use sslBaseAniamtion[]

then hope to know function.. which can only start One selected animation with name in UIlib Listmenu... at same time I hope to clean up un-necessary  sslBaseAnimation[] ..

any advice to clean up and improve is welcom...?

Posted

So I could manage it, but do not think it is best way.. (though for me it only worked..)

when I set the single animation...  I make new sanim ( sslBaseAnimation[] ) like this..

 

before >> 

sslBaseAnimation[] sanim
sanim[0] = sexlab.GetAnimationByName(animnames[aidx])

 

then I limit array length first.

 

    Else
        String [] Animnames = AnimSlots.GetNames(anims) 
        UILIB_1 UILib = ((Self as Form) as UILIB_1)
        int aidx = UIlib.ShowList("Select animation!!", Animnames, 0, 0)
        sslBaseAnimation[] sanim = new sslBaseAnimation[1]  ;limit sanim length as 1(so it may only contain one animation..)
        sanim[0] = sexlab.GetAnimationByName(animnames[aidx])
        SexLab.StartSex(acts, sanim, Victim=akSpeaker)
        Debug.MessageBox("start >>" + animnames[aidx] +" animation!!!")
    endif

 

Now it seems worked... but I hope to know more smart way,, if someone teach me...

Archived

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

  • Recently Browsing   0 members

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