Jump to content

Trouble with Triggering Tagged Animations:


Recommended Posts

Posted

Okay, so usually I try and figure things out on my own, but this one is a complete mystery -

 

I'm working on a mod that triggers specific tagged animations depending on your dialogue choices (standard stuff for many SexLab mods). So basically I want choice A to trigger animations with tags 1, 2 and 3, but not tags 4, 5 and 6 for example, etc.

 

Problem is, SexLab just seems to do whatever it wants - making a new animation selection over my script. I choose the dialogue, the program enters making state, my tag conditions pop up just fine, then the program says, "Thread[0] - Selecting new creature animations - []" (Oh yeah, some of my actors are creatures, not sure if that changes things...) and then some random animation is selected.

 

--------------------------------------------------------------------

 

Here is my code:

Scriptname TestDial1 Extends TopicInfo Hidden

;BEGIN FRAGMENT Fragment_0
Function Fragment_0(ObjectReference akSpeakerRef)
Actor akSpeaker = akSpeakerRef as Actor
;BEGIN CODE
actor[] sexActors = new actor[2]
sexActors[0] = SexLab.PlayerRef
sexActors[1] = akSpeaker
sslBaseAnimation[] anims
anims = SexLab.GetAnimationsByTags(2, "Vaginal", "Oral,Anal")

SexLab.StartSex(sexActors, anims)

;END CODE
EndFunction
;END FRAGMENT

;END FRAGMENT CODE - Do not edit anything between this and the begin comment

SexLabFramework property SexLab  Auto

 

 

--------------------------------------------------------------------

 

Again, it compiles and runs fine, I just can't get it to follow my tag parameters. It's like some other script is overwriting my code or something...

 

- Surgat

  • 3 weeks later...
Posted

Could anyone provide me with some source code for initiating tagged animations after a dialogue? I'm trying to crack this but so far I have no idea why the game is selecting a new animation after my script executes.

 

Perhaps my code is missing something? I've tried to follow the scripting examples to the letter... Again, it initiates a sex animation, but SexLab overrides my tag request.

Posted

There are some special considerations when filtering creature animations.

;/* GetCreatureAnimationsByRaceTags
* * Gets an array of creature animations that have a specified set of tags AND are valid for a specific creatures race.
* *
* * @param: int ActorCount - The total number of actors, between 1-5 the returned animations should be intended for.
* * @param: Race RaceRef - The race the returned animations should be usable by.
* * @param: string Tags - A comma separated list of animation tags you want to use as a filter for the returned animations.
* * @param: string TagSuppress - A comma separated list of animation tags you DO NOT want present on any of the returned animations.
* * @param: bool RequireAll - If TRUE, all tags in the provided "string Tags" list must be present in an animation to be returned. When FALSE only one tag in the list is needed.
* * @return: sslBaseAnimation[] - An array of animations that fit the provided search arguments.
*/;
sslBaseAnimation[] function GetCreatureAnimationsByRaceTags(int ActorCount, Race RaceRef, string Tags, string TagSuppress = "", bool RequireAll = true)
return CreatureSlots.GetByRaceTags(ActorCount, RaceRef, Tags, TagSuppress, RequireAll)
endFunction

There are more creature related functions documented in SexLabFramework.psc

Posted

Ahh, thank you! I figured there was something I was missing, but didn't realize there was an entirely separate function just for creature animations. This explains why my human actors were functioning fine but not my animal ones - cheers!

Archived

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

  • Recently Browsing   0 members

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