Destroying entities

Is there a way to destroy all entities of one type (ie projectile) when one comes into contact with the player? I could post the game it’s for if needed

1 Like

Yes! First go into sprite category!
image
Then scroll down to lifecycle! And get this block!
image
An array is a list of things (Numbers, texts,…) and here the list of all sprite kind player!
Next go to loops and get this block!
image
image
Then drag the block out and drag the array of sprites kind into the list thing!
image
(Change the kind to whatever kind to destroy (Food, Players, Enemies, Projectiles…)
Then drag the destroy block in this loop!
image
Then drag the value out of the loop and place it in the destroy!
image
Done! Now every sprite of kind Player does what happens in this loop! (Delete, Shoot Projectile, Use, Attack…)
Hope this helps! And Welcome to the Forum!

3 Likes

Use the tilemaps extension. A block there does that.