Jump to content

How to change a player reference to an actor reference in papyrus


Recommended Posts

Posted

Hello, I am trying to make a mod for the first time using sexlab animations and I was trying to adapt this papyrus code for my purposes:

 

actor[] sexActors = new actor[2]

sexActors[0] = Game.GetPlayer()

sexActors[1] = akSpeaker

sslBaseAnimation[] anims

anims = SexLab.GetAnimationsByTag(2, "Cowgirl",tagSuppress="Fisting")

SexLab.StartSex(sexActors, anims)

 

I took it from the Caden Black Gaming tutorial on how to script with Sexlab, but my goal is to replace the Game.GetPlayer() with an NPC. I have this NPC set as a quest alias called Follower, but I can't figure out how to change it to that and compile it. I've tried a few different methods and searched a bunch, but none of them have worked. It seems like the vast majority of resources are only for when one of the participants is the player. Any help is appreciated, I am very new to this!

Posted
ReferenceAlias Property Follower auto

Function yourFunction()
	Follower.GetActorRef()
EndFunction

Should look like this if you're looking to get actor reference.

Posted
1 hour ago, Gyra said:
ReferenceAlias Property Follower auto

Function yourFunction()
	Follower.GetActorRef()
EndFunction

Should look like this if you're looking to get actor reference.

 

Thank you! That sorted it! I tried GetActorReference() already and that didn't work so I didn't think to try that

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...