481,950 views
16 votes
16 votes
The unit has you writing a script that ends each level when a sprite gets to the right edge of the screen. Propose another “level completed” solution where the levels ends when the player hits a certain part of the screen WITHOUT relying on coordinates. Describe your solution, including the code blocks you would use instead of coordinates.

User AminRostami
by
2.8k points

1 Answer

20 votes
20 votes

Answer:

I would make a system to go to the next level of the game without using coordinates by creating a finish line for each level that is a color like green or red. When the player’s sprite hits the finish line, it will activate a part of the code which will make the next level appear. To do this I will use an if statement. If the sprite is touching green, it will move to the next backdrop. This will create a way to go to the next level without using coordinates.

Step-by-step explanation:

This is what i put as the answer, hope it helps! Dont forget to change it a little bit so you dont get flagged and stuff.

User Niklas Winde
by
2.5k points