Notifications
Clear all
[Closed] Help getting started with an array
Mar 19, 2019 11:59 am
Hello, I am trying to init a multidimensional array
including an
- object
- the object’s bounding box minimums in min.z / min.x / min.y
beginner here.
global allPieces = $Piece* (objects i am interested in are prefixed “Piece”, this array inits fine)
global piecesArr = #() (the destination array)
for i = 1 to allPieces.count do(
local currentObj = allPieces[i]
local min_Z = allPieces[i].min.z
local min_X = allPieces[i].min.x
local min_Y = allPieces[i].min.y
piecesArr[i] = #(currentObj, min_Z, min_X, min_Y)
)
4 Replies
Mar 19, 2019 11:59 am
append <array> <value>
so:
append piecesArr #(currentObj, min_Z, min_Z, min_X, min_Y)