Getting an object reference from a quest alias.

Post » Thu Jun 21, 2012 7:12 am

I have a quest alias created by an event, which is a non-unique NPC and is different every time the event occurs. I use this quest alias in scenes without any issues, but if I want to run scripts on that NPC that requires the object reference, i.e. GetDistance I am unable to do this.

How can I return the distance between the player an alias?
User avatar
hannaH
 
Posts: 3513
Joined: Tue Aug 15, 2006 4:50 am

Post » Thu Jun 21, 2012 4:31 am

ReferenceAliasProperty.GetReference().GetDistance(Game.GetPlayer())
User avatar
Kayla Bee
 
Posts: 3349
Joined: Fri Aug 24, 2007 5:34 pm

Post » Thu Jun 21, 2012 3:11 pm

Over half hour of searching and I couldn't find that out. Which I'd known about GetReference a month ago, would have made things a lot easier.

Thanks JustinOther, massive help.
User avatar
Nicholas C
 
Posts: 3489
Joined: Tue Aug 07, 2007 8:20 am

Post » Thu Jun 21, 2012 3:05 pm

Thanks JustinOther, massive help.
I want to echo this really quick. There are three or four people here who are always answering the stupid stuff I come up with. THANKS JustinOther! And those other people. Wish you were ActorBase I could .MoveTo(MyComputerDesk).
User avatar
Lauren Denman
 
Posts: 3382
Joined: Fri Jun 16, 2006 10:29 am

Post » Thu Jun 21, 2012 4:37 am

No prob :) Glad to be able to help when able.

JustinOtherREF.MoveTo(AenarasDeskREF)JustinOtherREF.PlayIdle(WaveHello)
User avatar
Oscar Vazquez
 
Posts: 3418
Joined: Sun Sep 30, 2007 12:08 pm

Post » Thu Jun 21, 2012 4:57 am

Another dumb question. Is there a similar way to get the actor of a quest alias? I can't seem to find a corresponding function.

The NPC is a alias, actor, and object reference. This is not as easy as I thought.
User avatar
pinar
 
Posts: 3453
Joined: Thu Apr 19, 2007 1:35 pm

Post » Thu Jun 21, 2012 2:15 am

http://www.creationkit.com/GetActorReference_-_ReferenceAlias returns GetReference() As Actor.
User avatar
Kahli St Dennis
 
Posts: 3517
Joined: Tue Jun 13, 2006 1:57 am


Return to V - Skyrim