I am trying to create a game similar to Egg Hunt but I have problems with coding. It would be possible that somebody explain how to collect objects and when you have all of them collected, show a message ( something like the game that is in the gallery).
I started creating a list but after I don´t know how to continue:sweat:
Thanks in advance
Begoña
I need to find/ collect 6 objects: Fancy woman, train, gorilla, parrot, park bench, treasure chest. When I pass the mouse the objects disappear. But when all of them are out of scene it should there be a text saying: “Well done”.
Could @Stefan or somebody have a look to the code and tell me the next step. Thanks
you’ve created two different scripts in your space in which the reconto variable is checked if it’s length is 6. Right now, variables only exist in the same script in which they’re created in and can not communicate across different scripts.
This means that each of your reconto variables are unique to each script.
To solve this, simply create a forever loop at the end of your first script to check for the length of the reconto variable.
Below is a space that demonstrate code improvements to your space. Please press the remix button to get a copy of it and see what has changed. Hope this helps!
Some more notes:
variable names are case sensitive (Reconto and reconto are two different variables).
you can use the add item to list - block to dynamically add items to the end of your list variable, so you do not have to define the index at which you want to add the variable yourself.