I’m trying to understand how Any Component works. I’m trying to make a slider that moves a sprite along the X axis.
I tried this code which gets an error that a String is given when a Sprite??? is expected or something like that. The disconnected code below works but I don’t want to have to list that for every sprite in the list. What am I missing? I though Any Component was supposed to work to avoid a lot of excess code. Is there a way to use it in a way that says do this action for whichever sprite is visible or enabled? Thanks!
The Any component blocks are for when you really need to have multiple components in play at the same time.
If you can reuse the same component with different images or visibility values at different times, that works well.
If you need to distinguish one Sprite from among a bunch of other Sprites, save its component block ina global variable and use the global variable with the Any blocks.