I’ve many boxes, with items inside them.
the player can move the boxes.
when the player push one box, i’d like to move in the same time, the box and the item inside it. For the moment, only the box moved, not the item.
item and box have the variable “number_box” (1,2,3,4…)
The variable “number_box” is the same for a item inside a box.
Can you help me, please ?
If you were doing this through events, you could simply use the “link object” event actions to link the two objects (box and item), then just use “Take all items into account” action when moving them.
Simple. use the “Put an object around another” function to link the box with its contents. Obviously you will point to the box with the “Z order” higher than that of its content, so it is hidden.
Then you just have to move the box that its contents will move accordingly without anyone seeing it.
If you then need to separate the two objects, then use the “Separate two object” function.
these are the commands I told you