![]() ![]() ![]() You can change its name from 'w' to whatever you want, just make sure to also change it in the next line Counter c w. YourWorldName w (YourWorldName) getWorld () //Replace YourWorldName with the name of your world class. * Check whether we have stumbled upon a worm. how to make scoreboard get sscore from counter Show us your code. * Check whether a control key on the keyboard has been pressed. * Alternate the crab's image between image1 and image2. * the 'Act' or 'Run' button gets pressed in the environment. * Act - do whatever the crab wants to do. Image2 = new GreenfootImage("crab2.png") * Create a crab and initialize its two images. Pause with "esc" besides "p" is also possibly now.How do you make the crab give a certain sound after it turns more than 18 degrees? It already moves when the left/right keys are pressed. You fly a spaceship through space and try to. Asteroids 1 (Chapter 1) This is a simple version of a classic arcade game. The scenario has no specific purpose other than illustrating some important object-oriented concepts and Greenfoot interactions. At about 18k+ points, it is the same again.ĭeleted the easy lobster-only wave to make it a bit harder. This is a simple example showing wombats moving around on screen, occasionally eating leaves. It doesnt end when the crabs eats the worms. In simple words, the first ones appear later, the later ones earlier. A new version of this scenario was uploaded on Sun Sep 16 14:06: Controls Player 1 Right right arrow left left arrow Player 2 Right 'S' key Left 'A' key. A new version of this scenario was uploaded on Wed Nov 16 01:59: Made Lobster slightly faster and changed code for the way Crabs turn at the edge of the world - made it smoother and less spinning. Changed the conditions, that the waves appear. // (Actor, World, Greenfoot, GreenfootImage). Crabster moves on its own - use arrow keys (Left/Right) to turn left and right. Eat all 25 worms to win Avoid getting eaten by lobsters. These changes were needed to prevent players from just wait until all worms "changed their color" to get many lives. Eat as many worms as possible, as fast as you can. GreenfootSound song new GreenfootSound ( 'song. If a worm got visited by flies five times and is still green, then it is also resistant against infections. Im stuck with the following problem: I have a MainmenuWorld, where I start playing a sound named 'song' in a loop. Worms can only be infected by worms as they are young (one minute after "birth"). It is "off" at default and can be (or not.) activated with "x" and deactivated with "y". Well, I will see what happens when it is uploaded. ![]() In Greenfoot, I get an error message, but it does play the loop. The background music is probably still broken. Questions, and comments are welcome as every time.Ī new version of this scenario was uploaded on Mon Nov 25 16:32:Īdded the possibility to turn off sounds with "a". The game ends when you lost all your lives. Mutated lobsters and spiders let you lose two lives. If a lobster tries to eat you, you will lose a life. Mutated Lobsters (black) also eat mutated spiders. Mutated Spiders (blue) also kill Lobsters. We can make that sound play every time the crab eats a worm by adding a single line to our crab class that calls aySound after we remove a worm from the world: Give that a try. The scenario comes with a sound ready for you to use, named ' eating.wav '. ![]() Lobsters will die when they eat too many red worms. Playing and recording sounds We can add some sound to our scenario. Green worm = > +5 points (+1 additional point for every other crab in the world)įlies infect worms which is displayed by other colors of the worms. Eat worms to increase your score and avoid to get eaten by others. brokenĭescription: You are the orange crab. Press r to restart after the game is over. This game is based on the Little Crab game created by Michael Kölling.Ĭontrols: Use the arrow keys to move and turn. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |