How to use SetLookAt() in a scene script?

Post » Thu Jun 21, 2012 2:59 pm

So I'm trying to use http://www.creationkit.com/SetLookAt_-_Actor to have the characters in my scene look at eachother uninterrupted (instead of just when they speak), and it says it's not a function when I add it to a Timer in the scene. I think this is because it belongs to 'actor script' according to the wiki.

How can I use this, then, in a Timer script fragment for my scene? I'll also need to use http://www.creationkit.com/ClearLookAt_-_Actor at the end of the scene. I'm thinking I need to use 'as' in this, but I've only done that like once and I'm not sure what to do. I'm like 90%, I just need a little push. :P

Thanks for any help,
Alexander
User avatar
Alexander Lee
 
Posts: 3481
Joined: Sun Nov 04, 2007 9:30 pm

Post » Thu Jun 21, 2012 3:19 pm

you either need to declare the actor refs as objRef properties or use RefAliases

then to use the function you do

(ActorRef as Actor).SetLookAt()

or

(RefAlias.GetActorReference()).SetLookAt()
User avatar
Dan Wright
 
Posts: 3308
Joined: Mon Jul 16, 2007 8:40 am

Post » Thu Jun 21, 2012 1:41 pm

(ActorRef as Actor).SetLookAt()
Doh, there it is. Thanks! :D
User avatar
Sheeva
 
Posts: 3353
Joined: Sat Nov 11, 2006 2:46 am


Return to V - Skyrim