How to use spawner for specific location?

This is probably a stupid question, but how do I use the spawner? I’m trying to make an object spawn at a specific location when pressing a button, but I don’t really understand how to do so… :grin:

You input the X location and the Y location in the behavior, Afterwards hit spawn to spawn the object that you set. To set an object in the behavior, you have to click the behavior and tell it what object to spawn (so re-name your objects instead of “New Type 00”). The X and Y numbers shown in the behavior after clicking isn’t needed unless you want to only spawn there first.

The spawner uses pixel location and each cell is made of 32 pixels.
So if you want to spawn at (6,4); the x input would be 192 (32x6), and the Y input would be 128 (32x4).
Hit spawn after inputting the numbers will make the object spawn at (6,4)

3 Likes

Thank you for your help! It worked wonders :grinning:

here is just an example of using a spawn block. https://www.loom.com/share/697845002499429f8720af9df77ae194
I do way better videos on a YT Channel. If you want the name, I can give you the name.

1 Like

That’s a very useful video! I managed to figure it out, but still, thank you very much for answering! :smile:

Thank you! Here is the link for my YT Channel: https://www.youtube.com/channel/UCf2xcsdr_LAXj9iOwOmTtNg

1 Like

how well would a random block work for the spawning?

1 Like

It should work just fine, just make sure you have a delay before hitting the spawn input.
(you could use a timer set to 0)