TheonGreyjoy Posted August 31, 2022 Posted August 31, 2022 I am trying to add script to play a sexlab animation after player dialogue but I want the animation to be the player and another specific nearby actor, not the speaker.. I gave the actor a faction and this is how I made the script: Function Fragment_1(ObjectReference akSpeakerRef) Actor akSpeaker = akSpeakerRef as Actor Actor TargetActor int n While (TargetActor == none) && n <= 10 n += 1 TargetActor = Game.FindRandomActorFromRef(PlayerRef, 2048.0) If (TargetActor.GetFactionRank(TSISpiderBrutusFACTION) < 0) || TargetActor == akSpeaker || TargetActor.IsDead() || TargetActor.IsDisabled() TargetActor = none EndIf EndWhile If TargetActor != none actor[] sexActors = new actor[2] sexActors[0] = Game.GetPlayer() sexActors[1] = TargetActor sslBaseAnimation[] anims anims = SexLab.GetAnimationsByTag(2, "Aggressive",tagSuppress="Fisting") SexLab.StartSex(sexActors, anims) Else Debug.Notification("Unable to find actor for scene.") EndIf EndFunction When compiling this is the error I get: Starting 1 compile threads for 1 files... Compiling "TSIBrutusSpiderScript"... C:\Program Files (x86)\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\TSIBrutusSpiderScript.psc(9,0): mismatched input 'Function' expecting ENDFUNCTION C:\Program Files (x86)\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\TSIBrutusSpiderScript.psc(37,0): missing EOF at 'EndFunction' No output generated for TSIBrutusSpiderScript, compilation failed. Batch compile of 1 files finished. 0 succeeded, 1 failed. Failed on TSIBrutusSpiderScript This is the tutorial I am following just with the different script:
Taki17 Posted August 31, 2022 Posted August 31, 2022 This doesn't seem to be the whole fragment. I'm guessing there is a superflous EndFunction at the end of it, since the fragments automatically surround themselves with a Function-EndFunction pair on generation.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now