Object reference of a base object

Post » Fri Apr 12, 2013 9:06 pm

What method should be used to get a object reference of a base object ?

What I am trying to do is get the Faction/Relationship details on some NPC's, I filled a list with NPC forms and now
I am indexing thru them, getting ObjectRef, forcing to AliasRef and then to ActorRef for a "GetRelationship" call.
I havent debug any the other lines till I can get a ObjectRef.

I have done quite a bit of hunting but I havent seen any thing that stood out as a method I could use for getting
that ObjectRef of the base form.

Below, the underlined statement is returning "none", ...appreciate any insight

FormList Property List Auto
ReferenceAlias Property rNPC Auto
ObjectReference Property oNPC Auto

While (iIndex != IndexSize)
......oNPC = List.GetAt(iIndex) as ObjectReference
......iIndex += 1
......rNPC.ForceRefIfEmpty(oNPC)
......kActor = rNPC.GetActorRef()
......Int Rank = kActor.GetRelationShipRank(Player)
..........
..........
EndWhile
User avatar
Jonathan Montero
 
Posts: 3487
Joined: Tue Aug 14, 2007 3:22 am

Return to V - Skyrim