How to add an element to an array that contains another array

I know how to add elements to an array, but I don’t know how to add elements to the following array structure

PropData:=class<concrete>():
    @editable
    PropsIn:[]creative_prop = array{}

Forum := class(creative_device):
    
    @editable
    IndexProp:[]PropData = array{}

In a creative_prop array they are added in the following way

var PProps:[]creative_prop=array{}

HamburguerList:=GetCreativeObjectsWithTag(HamburguerTag{})
            for(Hamburguer:HamburguerList):
                if(H:=creative_prop[Hamburguer]):
                    set PProps += array{H}

Im confused where do you want the elements to be? From what I assume you already are putting the creative_props in the PropsIn array and the IndexProp Will just have the different prop arrays could you be more specific as to what youre trying to achieve?

Basically what I want to do is that in position 0 I assign elements from a creative_prop, in position 1 I assign elements from another creative_prop and so on.
In a way similar to this
1
In the editor it can be done manually but I want to do it in code

Here is what I have

PropData:=class<concrete>():
    @editable
    PropsIn:[]creative_prop = array{}

Forum := class(creative_device):
    
    @editable
    IndexProp:[]PropData = array{}

To make myself clear, I want to add elements to the IndexProp array but I do not know how to do it. I try to do the following but it does not work

for(Hamburguer:HamburguerList):
  if(H:=creative_prop[Hamburguer]):
    set IndexProp.PropsIn += array{H}

I already know how to solve it

if(H:=creative_prop[Hamburguer]):
  SaveProp:=PropData{PropsIn:= array{H}}
  set IndexProp += array{SaveProp}

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.