Jump to content

Making a Script Alias Permanent ?


Recommended Posts

Ok, I can set an NPC to a quest Alias, It all works fine, Except when reloading the game they are no longer part of the Alias, I have to re-add them to it. How can I make them remain linked to the Alias... After setting them to the alias it all works, but then after saving and loading again they are no longer a member of the alias

 

 

 

 

 
RefCollectionAlias Property ApprenticeAlias Auto Const Mandatory
 
RefCollectionAlias Property ArmorerAlias Auto Const Mandatory
 
Event OnEquipped(Actor akActor)
If(iButton == 0)
ApprenticeAlias.AddRef(akActor)
ElseIf(iButton == 1)
ArmorerAlias.AddRef(akActor)
EndIf
EndEvent
 

 

 

Link to comment
Share on other sites

Why are you using Const?

 

http://www.creationkit.com/fallout4/index.php?title=Differences_from_Skyrim_to_Fallout_4#Const_Auto_Properties

 

Auto Properties

By adding the word "Const" at the end of a property definition, you are telling the game that the value will not change once it has been set by the editor. The compiler will make sure you cannot change the property's value, and the game will ignore any value in the save game recorded for the property. This allows you to change the value of a property in the editor, and have the change be reflected in the game, even if you load a save game. Properties made via the editor will be const by default.

Link to comment
Share on other sites

While the const issue could be the culprit. I became aware of a ForceRef function. If changing the const to auto doesn't resolve it you might try using ForceRef instead of AddRef. That's how the script that changes dogmeat's name works. Caveat I see, is that (if there exists a RemoveRef) you'd have to do another ForceRef to put a previous setting back.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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