This site requires JavaScript, please enable it in your browser!
Greenfoot
Username
Password
Remember Me?
Sign Up, Lost Password
Activity
About
Documentation
Download
Discuss
Scenarios
Discussions
You need to login to take part
Current Discussions
Creating an Ammo Counter
By ThanksGreenfoot, with 6 replies.
Last reply by Super_Hippo, over 9 years ago:
Show the whole code again (and use code tags please). Did you create an act method?
Logic with Classes
By gurgi414, with 3 replies.
Last reply by Nosson1459, over 9 years ago:
You can't use the equal operator for classes if that 's what you're asking. You should probably use 'instanceof'.
make sound when turning a certain amount?
By Mjosue, with 4 replies.
Last reply by Nosson1459, over 9 years ago:
Mjosue wrote...
The professor wanta the sound to play whenever the crab turna 18degrees or more.
So what's your problem? The code given by Hippo will find the amount of degrees to turn and if it's greater than 18 or less than -18 (for turning in the other direction) it will play a sound.
how to i make a lobster eat every other crab?
By Mjosue, with 5 replies.
Last reply by Mjosue, over 9 years ago:
Illtry it once i am home.
How do I make worms turn as follows?
By Mjosue, with 7 replies.
Last reply by Mjosue, over 9 years ago:
Ill try it as soon as i get home. Thanks
Help Making An Actor Follow A Mouse When Mouse Is Pressing it
By MichaelMac, with 1 reply.
Replied to by Super_Hippo, over 9 years ago:
What exactly do you want? - mouse pressed on actor → actor is set to mouse location as long as mouse is pressed/dragged = something like drag & drop - mouse pressed on actor → actor is "selected" → mouse moves around, actor is set to mouse location until the next mouse click will unselect it = similar to above - mouse pressed on actor → actor is "selected" → mouse click (right mouse button?) tells the actor where to move (strategy games) - something else? From your text, I would guess it is option number 1, but I am not really sure. If it is, you could check for the mouse click on the a
How to add objects only if a button is pressed
By ObliviaOng, with 10 replies.
Last reply by ObliviaOng, over 9 years ago:
ahhh no wonder, whoops i forgot to type that down, i just ran the program and it works, thank you so much for your help! :D
Working with files
By mitrolex, with 5 replies.
Last reply by mitrolex, over 9 years ago:
Thanks danpost, it worked.
Automatically changing & insert objects after.
By OKNEM, with 17 replies.
Last reply by Super_Hippo, over 9 years ago:
You can't use timers like that in a method which is only called from the constructor and not from the act-method. It is only executed once. Another thing is that the Intro and Rules you add is not the same as the one you save in the 'intro' and 'rules' variables. Try out this:
Bounce off walls at opposite angle
By 101929ha, with 2 replies.
Last reply by 101929ha, over 9 years ago:
YAY! It works. Thanks danpost!
How can I make the wombat eat all the leaves on its own
By Lollava, with 1 reply.
Replied to by Nosson1459, over 9 years ago:
you can put in a random number and instead of just turning left you can turn right and left resulting in the wombat moving all over instead of just the edge
How can the second actor to follow the primary actor
By H3ater, with 1 reply.
Replied to by Nosson1459, over 9 years ago:
That's a very good question, because if you're following someone then your turns aren't random if your turns are random then you might end up going in a different direction then whatever it is you are following. You can have one actor follow another but I don't know what you mean by "follow the Bee with random turns".
Actor goes through moving platforms
By beshie, with 1 reply.
Replied to by danpost, over 9 years ago:
Code the behavior of each actor in their own class. HINT: it is the behavior of the Ice objects to move anything on them with it. Therefore, Bailey will have its own movement, coded in its own class, plus the movement provided by the Ice object it may be on, coded in the Ice class.
How long are the numbers in Greenfoot.delay();?
By OKNEM, with 2 replies.
Last reply by OKNEM, over 9 years ago:
Awesome. Thanks.
How do I fix this Error message?
By Tuckerbm, with 2 replies.
Last reply by danpost, over 9 years ago:
A class is capable of creating multiple objects of the same type and therefore 'Space' is not specific enough to indicate which world will execute 'Loselife'. Using 'getWorld' will return the correct World object to execute the method on; however that is still not enough because it does not specifically return a Space object which is necessary to execute the method located in that class. We must inform the system that it is indeed a Space object through typecasting: <Code Omitted>
385
386
387
388
389
390
391
X