Hello,
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:
&
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 Array
endif
Let CurrentRef := GetFirstRef 32
Label 100
If (CurrentRef)
If (CurrentRef.NameIncludes "Chair") || (CurrentRef.NameIncludes "Stool") || (CurrentRef.NameIncludes "Bench") || (CurrentRef.NameIncludes "Cushion")
ar_Append NPC01_Chairs CurrentRef
PrintToConsole "%z: %n added to array" Name CurrentRef
endif
Let CurrentRef := GetNextRef
GoTo 100
endif
Let NPC01_ChairsLast := ar_Last NPC01_Chairs
set NPC01_ChairSelection to Rand 0 NPC01_ChairsLast
..............
..............
