Save every block location

Hello, I would like to make it so that every block you place it saves the position but doesn’t mess with the other saves… how would I do this?
This is for a world builder for my game GlitchShot

Someone who might be able to help me

@CodeAlpaca

this is done in this game where it saves all the previous positions of your bits

So do I need something that spawns every block in?

So this is how I did it in Alpaca Raceway


What is happening here is a message is bringing sent into a repeater, and the repeater is set to repeat 5 times (you only need 3 for the X, Y and which object). That then raises a number behavior by 1 each time and I put that through a router to select what property I want to get. I add that to a Number List, not sure that is needed looking back on it but that’s how I made it (some other behaviors are there to reset it and for the different properties in Alpaca Raceway)


After all of it is added to the Number List I use a List Each (Probably not needed, you can probably just send the numbers directly to the Message)


That message is then added to a Number List. After the objects get the message a timer will go to the All Input of the Number List (timer is set to 0). That then goes into a List Each, and that will go into the bundle.


This all then goes into a router to choose which save file I want to add it to (Not needed for you). All those values get added to a Number List, and when the List Each is done the values in the Number List are saved to the Save Behavior.


So I have the Router set to 5 outputs, you only need 3 for the X, Y, and the object. It basically sets the Number List and then the values switch between each Router output


What happens is it basically finds which object you want to spawn (I should have used a Router) gives the X and Y cords then spawn it.

Make sure to give credit

I always do

2 Likes

What’s in the save and spawn bundles?

You see there’s this crazy thing where you can click them and see

I know but these save bundles don’t look the same…

image

Ohh that save bundle is in the object being saved

This is the save bundle in that object

1 Like

yes, it already has that code as well

1 Like

Pixel_Name If you need more help just ask and I’ll answer any questions you have or if you need I can look over your code.

1 Like