A good guys helped me write these lines so the NPCs add chairs etc in array and check when it is added.
The problem is that the array is filled with the chairs the PLAYER encounters and not the NPC running the script.
I suppose it has something to do with the code.
I also used:
Let CurrentRef := GetFirstRef 32&
Let CurrentRef := GetNextRef
but i get the same arror...
Can anyone helps me?
The code is:
...............................If eval ((ar_Size NPC01_Chairs) == -1)Let NPC01_Chairs := ar_Construct ArrayendifLet CurrentRef := GetFirstRef 32Label 100If (CurrentRef)If (CurrentRef.NameIncludes "Chair") || (CurrentRef.NameIncludes "Stool") || (CurrentRef.NameIncludes "Bench") || (CurrentRef.NameIncludes "Cushion")ar_Append NPC01_Chairs CurrentRefPrintToConsole "%z: %n added to array" Name CurrentRefendifLet CurrentRef := GetNextRefGoTo 100endifLet NPC01_ChairsLast := ar_Last NPC01_Chairsset NPC01_ChairSelection to Rand 0 NPC01_ChairsLast............................