Erm can anyone help

i want to make game to put animals but i cant save the number and locations for my animals can you help?

The settings blocks are used to store information in a special location so that, when your game restarts, that information is retained. It’s useful for things like a high score table or for remembering the player’s name, so that they only have to enter their name once and then your program always remembers it.

I put some information together on the settings namespace a while ago. It’s written in JavaScript because it was before the blocks were available, but you can get an idea for how to use the blocks from that write-up. I’ll add to that thread later this week with information on using blocks.

For your game, though, I think all you need to do is add the sprites to an array:

Once you add monsters to the array, you can get to any of them any time you need.

Play around with this code here:

If you need to store additional information for each sprite (e.g., health), then you could use the arcade-sprite-data extension:

Let us know if you need more help.

3 Likes