Jump to content

Referencing a property on a script attached to a reference alias


Recommended Posts

I want to reference a property on a script that is attached to a refalias, there will be multiple aliases all with same script attached.

The attached script has the following:

;;;the orginal CK default outfit;;;
Outfit    Property    CK_default_outfit        Auto

and in another script I have:

refalias_array[i].ForceRefTo(NPC_ref)
refalias_array[i].CK_default_outfit = NPC_ref.GetActorBase().GetOutfit()    

of course this doesn't work because 'refalias_array' is not a script, but I think it demonstrates what I want to achieve.

 

diziet

Link to comment
Share on other sites

refalias_array[i].ForceRefTo(NPC_ref)
myRefAlias = refalias_array[i] as ReferenceAlias
NameOfRefAliasScript myRefScript = myRefAlias as NameOfRefAliasScript
myRefScript.CK_default_outfit = NPC_ref.GetActorBase().GetOutfit()

A theoretical starting point, needs to be tested.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...