LIST contains pen_trails doesn't work

This says false but should say true...

This prevented me from only adding NEW pen trails to a list of stored pen trails (was doing a random drawing and only wanted the different ones on a list)

I think the pen trails block reports a new costume every time. What would happen if the pen trails get changed (new lines, new stamps, or clearing) before testing if the list contains the pen trails?

yes, that's right, @snapenilk, excellent analysis and explanation!

So, @dan_garcia , in theory - an in very laggy practice - you could compare the pixels of one pen trails costume with that of another, and it would check for equality of the numeric values. When comparing costumes we're currently checking for identity, not for structural equality (because that would be really slow). But since, as @snapenilk correctly pointed out evaluating the "pen trails" reporter creates a new costumes each time, no two will be identical even if they are derived from the same actual pen trails.

Does that make sense?

Yes @dan_garcia, and as Jens have said, you always can check pixels, if it is needed

But maybe this is too slow and has no sense. So, you can store that state (pentrails changed?) in a "state variable". You only need to "inform" (set it to true) when your script does some painting action, and "set it to false" when you store current pentrails.


pixels of costume worked great! I just stored a list of the pixels and compared the pixels of the pen trails costume to the list of pixels stored.

Makes sense that for speed you only check eq not equal for costumes...