Butterflies (inspired by a 'boids' idea)

Inspired by (but not resembling it anymore at all) the 'boids' :point_left: (Wikipedia article) idea.

When butterflies are within each other's (vertical) scope, they are colored violet, until they move away from the scope's vertical center too much.

If they suddenly escape the group's vertical center, they turn cyan.

Default color is yellow.


Thank you, funtime_foxy101.

No problem

I love how you make the pen trails fade out over time. I would never have thought of that technique!

Thank you, Brian.

Would it be possible to somehow calculate for each pair of clones how many steps they made in each other's "company" and save the data in a 2D table, or something?

There's no built-in feature for that, if that's what you're asking, but sure, any time a clone moves it can get MY NEIGHBORS and increment the relevant cells in a spreadsheet.

Thank you.

What should I do about increments that are reported twice, i.e. by two clones in the pair; or N-times, i.e. by N clones in a group of N?

Some of the redundancy that's worrying you seems inherent in the thing you're trying to compute. If I move and I'm near three friends, then yeah, that'll be recorded three times. Otherwise the whole thing just reduces to the total amount that I move while near anyone.

As for the specific case of two people recording the same move with each other, that shouldn't happen because only the mover, the sprite that just did a MOVE command, should record the motion in the table. If A and B are near each other and are moving at the same moment, then that's two separate motions, and they should both be recorded.

But in the project it's not different sprites that move; it's clones of a single sprite, all using the same MOVE command within the same "when I start as clone" script.

A clone is a sprite! And even if the clones share code, each of them runs that code with respect to itself. And each clone should record its own moves in its own column of the table.