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
how do you change a spawn location of an actor based on world its in
By jsherry21, with 1 reply.
Replied to by danpost, over 7 years ago:
Have the world respawn the object (only remove it when hitting a border).
Hi, I need help creating a score counter for my game and I don't know what to do
By Josh3560, with 14 replies.
Last reply by danpost, over 7 years ago:
Josh3560 wrote...
Hello, sorry, this is the only time I'm able to access my project.
I wrote:
You have shown a
score
class which does not appear to have anything to do with your game. Now, explain that.
Actor Traveling to Predetermined Coordinates
By __anna__, with 1 reply.
Replied to by danpost, over 7 years ago:
Save the starting coordinates and move from there as you move farther each iteration of the loop. Use
Greenfoot.delay(1);
within the loop to show the animation: <Code Omitted>I think I did that right so you can adjust the speed easily. This would replace lines 16 thru 18.
Spawn in a Given Area
By AdiBak, with 2 replies.
Last reply by AdiBak, over 7 years ago:
Thanks, it worked!
MAKE THE FINAL SCORE PER LEVEL APPEAR ON THE GAME OVER WORLD/ YOU WIN WORLD
By gdrgnxxi, with 6 replies.
Last reply by danpost, over 7 years ago:
There are two main ways to get the score to the win world. One is to add a parameter to the win world constructors and pass either the
Counter
object or the
int
score to it. The other is to split the line that creates the win world and sets the world active up into two lines so that you gain a reference to the new win world and can work with it directly:
replaying levels
By ErasedBlade, with 1 reply.
Replied to by ErasedBlade, over 7 years ago:
never mind. i fixed the issue.i am curently moddifying the variables only in the screen 1 class and not in each indivisual classes.
Question.
By donutfish, with 1 reply.
Replied to by Super_Hippo, over 7 years ago:
Try to use the getObjectsInRange method and remove the objects returned by that method.
Boss Health Help
By bboyguda69, with 3 replies.
Last reply by danpost, over 7 years ago:
It may be a MyWorld5 class issue (show codes). Of note, I do not see where your BossHealth image is updated when a hit occurs.
Adding Objects
By itscarlwheezer, with 3 replies.
Last reply by danpost, over 7 years ago:
itscarlwheezer wrote...
Thanks so much Super_Hippo can you send me that code?
<Code Omitted>Sorry, you only get what you put in for (no codes provided and very generalized description of issue).
LittleCrab
By SushiSlurp, with 3 replies.
Last reply by danpost, over 7 years ago:
All your
turnToward
calls use two x-coordinate values. You need to use one x- and one y-coordinate.
SOUND DURATION
By gdrgnxxi, with 5 replies.
Last reply by danpost, over 7 years ago:
I will give my solving suggestion at the end; first, however, I would like to inform you of some of the things I see wrong with the given codes. A big issue is that the object created at line 15 in your
Play
class is never playing and line 19 in that class will try to stop it and not the one created in your
StartGame
class which is playing. Next, even if
start
in your
Play
class was playing, it would stop instantly because the
act
method tells it to. That is, the very first time
act
is executed for the
Play
object, line 19 would stop it. Ba
LittleCrab - No error message but doesn't work
By SushiSlurp, with 2 replies.
Last reply by SushiSlurp, over 7 years ago:
that would work but i tried to make a delay so that the lobster always turns to the position the crab was 5 timeunits ago, thats why i made the switch case statement
Crab
By kobe, with 1 reply.
Replied to by danpost, over 7 years ago:
kobe wrote...
How to distinguish two crabs by different colors?
Show Crab class codes.
Null Pointer Exception in Breakout
By SpicySpaghetti19, with 2 replies.
Last reply by SpicySpaghetti19, over 7 years ago:
Thanks :)
isTouching
By asdfvckyeol, with 3 replies.
Last reply by Super_Hippo, over 7 years ago:
It shouldn't be allowed to write "it doesn't work" without any explanation. Show your Trash class code.
188
189
190
191
192
193
194
X