How to make items emerge from a block?

Okay, I’m making a Mario game called: New Crappy Mario Bros." and I’m trying to make the mushroom come out of the lucky block. I used the spawn and the collision behaviors but it didn’t spawn where I wanted it to even with coords. I also want it to spawn only once. Does anyone know how to do that?

1 Like

Emit

Yeah, there’s an emit block in components…
But you can still use spawn, it just probably doesn’t work because every block is 32 pixels, so you have to take the grid cords and multiply by 32. These would still spawn coins in the same spot for every block, though, so you would need to extract the cords of the block and base the spawning off of that.

If you go to the Help section, then Examples, you can find an example for coin/powerup blocks.
Example:

Help page:

3 Likes

Thanks! This helped!

In general, it’s best not to use emit for these types of things. Spawn is more precise and is overall better because it gives you more control