How do I assign a script to the player ?

Post » Wed Jun 20, 2012 10:08 am

I am trying to make a script that detects when the player sits down. (for a quest)


So I decided to use the "onSit" event. But this is supposed to be assigned to a actor. But I need this to be assigned to the player.



I tried to fool around a little bit and I found out there is an actor named "player". Does it work to create a quest alias and assign it to a unique actor "Player" and then assign the script to that ?
User avatar
Sara Lee
 
Posts: 3448
Joined: Mon Sep 25, 2006 1:40 pm

Post » Wed Jun 20, 2012 11:09 am

yes. This is a pretty easy way to hang a script on the player. It will stay on the player until you stop the quest, or clear the alias.
User avatar
Laura Tempel
 
Posts: 3484
Joined: Wed Oct 04, 2006 4:53 pm

Post » Thu Jun 21, 2012 12:56 am

You could also slap the script right on the Actor Player instead of using a Ref Alias but that could interfere with other mods and is not considered best practice.
User avatar
Emmanuel Morales
 
Posts: 3433
Joined: Sat Oct 06, 2007 2:03 pm

Post » Wed Jun 20, 2012 7:32 pm

Oh thats awesome.

It just seemed too simple really.
User avatar
ZANEY82
 
Posts: 3314
Joined: Mon Dec 18, 2006 3:10 am


Return to V - Skyrim