I'm coming up with a problem with a quiet complex system that is probably to complex for my level of geo nodes knowledge. Still i hope to solve and understand it, learning with challenges...
I'm building a creeping maggot system and it all works quiet good. In the posted .blend it's already heavily simplified as it also involves Curve Deform-Nodes, collision, much more synchronized set_positions etc. The last thing i wanted to add to this simulation was the maggots to stop for some time and start creeping again (and waving their heads while they stop, that also works in the bigger file).
The problem occurs when i try to offset this 'stoptime' per maggot/index/island index. I've been trying to debug for few days, but just can't. I see in the spreadsheet that there are strange things going on with the indices, they are flipping around... To me it seems like the island index assignment would loose consistency, maybe due to the 'top' or 'age' attribute in conjunction with the delete-node???? I have no clue...
I tried to simplify the system as much as possible to show the problem. In the file you find two objects, one is with working maggot system, but without 'stoptime'-offset, and one not working with offset.
Would be really really kind if someone could look into it and help me. Thx!!!
I just simplified the scene even more:
You can see the indices flipping at the end of the spreadsheet after frame 120 (what is the time when the movement has to stop). I marked the frame red in the node tree that contains the offsetting operation that brakes the system. You can just hit play, once with the 'maggots working'-object visible, once with the 'maggots not working'-object visible. The first one stops cleanly and continous the movement after some time, the second one starts stuttering.