(2020-05-31, 13:17)Merlijn Wissink Wrote: If you're hinting towards adding pieces to an existing buffer that need to be replaced together (e.g. you're adding a door to a model, then attach pieces to the door in the next step and only then close the door in the third step), that is indeed something that I honestly haven't thought about in my initial post. That's a good point
This is no problemo for FLOAT. The code would look like this:
Code:
0 !FLOAT [id=a]
// Door in open position
1 [door in closed position]
0 STEP
0 !FLOAT [id=b]
// Part attached to open door
1 [part attached to closed door]
0 !FLOAT [id=c]
// Part attached to open door
1 [part attached to closed door]
0 STEP
0 !UNFLOAT [a]
0 !UNFLOAT [b]
0 !UNFLOAT [c]
Obviously that's very bloaty, but that's why we have groups. So FLOAT should be able to reference a group just as well as a part or submodel, and thus eliminate all those extra FLOAT commands (but replace them with grouping metas). That would look like this:
Code:
0 !FLOAT
// [color] [matrix] [group id=a] <-- matrix here is door group in open position
0 GROUP_NEXT [id=a] <-- simplified pseudo-code for LDCad's group meta
1 [door in closed position]
0 STEP
0 GROUP_NEXT [a]
1 [part attached to door]
0 GROUP_NEXT [a]
1 [part attached to door]
0 STEP
0 !UNFLOAT [group id=a]