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
Greenfoot.mouseClicked doesn't seem to be working
By NB111, with 2 replies.
Last reply by NB111, over 6 years ago:
Super_Hippo wrote...
1. The act method should not have any arguments. 2. The mouseClicked method requires an Actor object. Not a list. <Code Omitted>
Thanks
Setting Images
By TylerBlair, with 3 replies.
Last reply by danpost, over 6 years ago:
TylerBlair wrote...
How should I change it so the image displays on top of the black background?
To display it "on top", you would use an actor. To display it "on", draw the
directions
image onto the background of the world.
Pause Code of one Object
By insurqassable, with 1 reply.
Replied to by danpost, over 6 years ago:
insurqassable wrote...
<< Code Omitted >> I want to have a little bit of time between the image of the lock getting changed and the lock getting deleted, so you can actually see the opened Lock.
Add an
int
timer field to the
KeyLock
class. Set it to some positive value (30-60 maybe) when opened. Use
act
to count down the timer and upon reaching zero, remove the actor.
Hey, How do i use generic class type List<>
By dROS, with 1 reply.
Replied to by danpost, over 6 years ago:
dROS wrote...
How do i use generic class type List<> to calculate how many asteroids are left in the world background and add new asteroids when all have been cleared away. new ones appear, one more every time.
Just use: <Code Omitted>in an
act
method in your
Space
class.
Add certain amount of objects
By SemDeBakkero, with 10 replies.
Last reply by SemDeBakkero, over 6 years ago:
Oh shit thanks!!
Getting the location of an object
By ihjufaeshiju, with 3 replies.
Last reply by danpost, over 6 years ago:
ihjufaeshiju wrote...
Can you explain what line 5 does though?
LIne 5: <Code Omitted>defines a variable that can reference an
Actor
object and assigns to it an object, from the
houses
List
object at index
i
, cast as an
Actor
object (
(Actor)
).
Download a new font
By Ti103, with no replies.
Hi, i'm new here. I have a project and i have to use a downloaded font. When I use anyfont, it works very well, but when I use the downloaded font, it doesn't work.<Code Omitted>
fff
By DARKSGAMER, with 1 reply.
Replied to by AndyGun, over 6 years ago:
?
Greenfoot exercise 9.69
By dROS, with 1 reply.
Replied to by danpost, over 6 years ago:
dROS wrote...
Can anybody check my code? Code is between 77 to 89.
The condition on line 81 will always be true (that is, unless size is less than or equal to zero -- which would be never). I think you should be asking if the size is greater than 16 or not.
Exercise 9.69 Fix the score count
By dROS, with 3 replies.
Last reply by danpost, over 6 years ago:
dROS wrote...
code for more classes can you check it. << Code Omitted >>
Appears okay. And, finally, your
Bullet
class? It would seem like that is where the collisions are detected.
How can i have a player to move a certain amount of steps in order to finish the game?
By KiddoNow, with 1 reply.
Replied to by danpost, over 6 years ago:
KiddoNow wrote...
I have a player and they can move 1 step by pressing an arrowkey. Now i want them to reach an object and collecting it BUT with a certain amount of given steps. Lets say you start in the bottom left corner and the other object is somewhere in the upper right corner. Now you have to reach that object with exactly 15 steps e.g. How can i make such a counter?!
Just add an int field for the player. Increment it each time it moves. When object is reached, check its value for win/lose.
How to get the code for the Greenfoot base classes
By SailingStone, with 2 replies.
Last reply by SailingStone, over 6 years ago:
Thanks for that! That helps a lot.
Objects moving from the right to te left
By SemDeBakkero, with 3 replies.
Last reply by SemDeBakkero, over 6 years ago:
Aha, I didn't know that. Thanks guys
Enemies still Spawning
By Alexkr, with 3 replies.
Last reply by Alexkr, over 6 years ago:
I could fix it, thank you for the fast and clear response.
Delete Account
By Galaxy, with no replies.
Hi! I was wondering if it is possible to delete my account. And if so how?
160
161
162
163
164
165
166
X