How to assign properties to sprites (enemies)

Hi there.

I’m trying to assign different point values to enemy sprites. I can see how to set kind, x, y, etc. But can you create your own property or variable that will be assigned to a sprite? That way when you check for collision with “othersprite”, it will be able to lookup the point value of the sprite it’s hitting?

Thanks!

2 Likes

Yes! If you use the arcade-sprite-data extension, you can set all sorts of properties on your sprites!

“Data” shows up at the bottom of the Sprites category. You can use the blocks inside of an on created sprite of kind event container to assign a property to each enemy, then add your points to each individual enemy inside of an on sprite overlaps othersprite event.

1 Like