Jump to content

How do arrays of arrays function?


Recommended Posts

So OBSE does allow having an array of arrays, and I was hoping to use that for this scenario:

Its a randomized new start mod and for equipment randomization I have arrays of equipment and then an array of all those arrays. I want to get a random array from the array of arrays then do things on said array.

 

I'm not sure how I can get the array to work on from an array of arrays

Link to comment
Share on other sites

If memory serves, you just add the (sub)array to the (main)array as you add any other element

(Disclaimer: I am not 100% sure ... has been some time.... just refreshed my memory from here)

Something like this (building the sub-array after)

let MyArray := ar_Construct array
Let MyArray[0] := ar_Construct array
Let MyArray[1] := ar_Construct array
Let MyArray[2] := ar_Construct array

Let MyArray[0][0] := <something>
Let MyArray[0][1] := <something else>
. . .

or like this (building the sub-array first)

let MyArrayA := ar_Construct array
Let MyArray[0] := <something>
Let MyArray[1] := <something else>

Let MyArrayMain := ar_Construct array
ar_append MyArrayMain MyArrayA 
Link to comment
Share on other sites

  • Recently Browsing   0 members

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