![]() Uses a sprite to generate a trail of clones as it moves around the Stage (Nothing happens to the original sprite because it is not a clone.) SUMMARY When the player presses the C key, all the clones will delete themselves. As the snake gets longer, the difficulty of the game really scales up! Each point added to Score adds another 0.2 seconds of wait time, resulting in a longer and longer snake. When Score is 2, the wait is 2/5, or 0.4 seconds. When Score is set to 1, the wait is 1/5, or 0.2 seconds. When Score is set to 0, the wait is 0/5 seconds, or 0 seconds. So the more apples the snake eats, the longer the snake gets. This longer wait makes the snake look longer, because more Body clones remain on the Stage. As the Score variable increases, the amount of time a Body clone waits before deleting itself also increases. Every clone waits this amount of time, so the first Body clones made are the first Body clones deleted.Įating apples increases the Score variable. So each clone waits for a short time based on the Score variable in the wait Score / 5 secs block before deleting itself. The clones eventually need to delete themselves from the Stage so that the snake doesn’t just keep growing longer. This rotation makes the body segments look slightly different. The pick random 0 to 3 * 90 block makes the Body clone face 0, 90, 180, or 270 degrees. When the Body clone is first created, it points in a random direction. The Body clones code runs under when I start as a clone in script ➋. As the Head sprite moves around the Stage, the Body sprite creates a trail of Body clones in its path. Continued abuse of our services will cause your IP address to be blocked indefinitely.The original Body sprite code runs under the when green flag clicked block in script ➊. Please fill out the CAPTCHA below and then click the button to indicate that you agree to these terms. If you wish to be unblocked, you must agree that you will take immediate steps to rectify this issue. If you do not understand what is causing this behavior, please contact us here. If you promise to stop (by clicking the Agree button below), we'll unblock your connection for now, but we will immediately re-block it if we detect additional bad behavior.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |