pepperman35 Posted April 5, 2023 Share Posted April 5, 2023 (edited) What exactly are aliases? Are they form lists, arrays or what? They make my head hurt, whatever they are. Let’s take the WorkshopSummonedByAlarmScript as an example. I get that the alias_WorkshopNPCs gets populated with AddRef(theNPC). But what I can’t seem to figure out is how to determine the size of that alias at any given point during the execution of the while loop. I tried If Alias_WorkshopNPCs.GetSize() < UniqueSpecifiedValue and If Alias_WorkshopNPCs.Length < UniqueSpecifiedValue but the compiler didn’t like either of them. Suggesting they are not forms or arrays, so if there a way to get the size of the Alias_WorkshopNPCs at any given point? Scriptname WorkshopSummonedByAlarmScript extends Quest RefCollectionAlias Property Alias_WorkshopNPCs Auto Const ReferenceAlias Property Alias_Workshop Auto Const workshopparentscript Property WorkshopParent Auto Const ActorValue Property WorkshopBellDistance Auto Const ReferenceAlias Property Alias_Bell Auto Const function Startup() ; report startup to siren WorkshopSirenScript siren = Alias_Bell.GetRef() as WorkshopSirenScript if siren siren.SetAlarmQuest(self) endif ObjectReference[] workshopNPCs = WorkshopParent.GetWorkshopActors(Alias_Workshop.GetRef() as WorkshopScript) ; add them all to the collection int i = 0 while i < workshopNPCs.Length ObjectReference theNPC = workshopNPCs[i] ; what distance to travel (to randomize a bit) int dieRoll = Utility.RandomInt(0, 2) theNPC.SetValue(WorkshopBellDistance, dieRoll) Alias_WorkshopNPCs.AddRef(theNPC) i += 1 endWhile ; start timer StartTimerGameTime(0.5) endFunction ; timer shuts down quest Event OnTimerGameTime(int aiTimerID) Stop() EndEvent Edited April 5, 2023 by pepperman35 Link to comment Share on other sites More sharing options...
SKKmods Posted April 5, 2023 Share Posted April 5, 2023 RefCollectionAlias.GetCount() https://www.creationkit.com/fallout4/index.php?title=GetCount_-_RefCollectionAlias Link to comment Share on other sites More sharing options...
pepperman35 Posted April 5, 2023 Author Share Posted April 5, 2023 Thanks SKK50. I called myself looking at the wiki before posting but apparently I need to get my eyes checked. Link to comment Share on other sites More sharing options...
Recommended Posts