Storing Block objects on sprites

Is there a way to store the same block object on multiple sprites?
In the status bar extension one can “attach” a status bar to multiple sprites and have each status bar remain separate to each other. However, whenever I try something similar with block objects it doesn’t seem to work.
The main issue is that I have to use block objects as it’s the only way to “attach” a text sprite to a sprite

3 Likes

Here’s a hacky way I found to do it. If this is what you mean by assigning a single object to multiple sprites. If not, please elaborate so I can provide a correct solution

2 Likes

If the array was replaced by an “array of sprites of kind enemy” block would that work?

1 Like

Yep, should work, since that just returns a sprite array type

2 Likes

There seems to be some issues with returning block objects stored on the sprite.
In this test when the player overlaps with a sprite, the doughnut held by that sprite should disappear. However the doughnut that gets destroyed is always stored on the dog (which is defined last) so I don’t think the block object is being stored multiple times.

Basically, is there a way to store the object on multiple sprites but in a way that the block object of the sprite can be accessed and changed?

1 Like

I- still don’t understand quite what you’re trying to do (sorry I’m dumb :melting_face:)

2 Likes

Nevermind I managed to fix it by putting the
image in a

2 Likes