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 could the World actually work?
By KlausKrieger, with 3 replies.
Last reply by RcCookie, almost 5 years ago:
No problem:-) Concerning the change of the world, this might also help: Every frame of the Greenfoot application the current world gets rendered by (simplified) stacking the images of all the actors on top of the worlds background image. If the world changes, the images used to render will simply look different on the next frame, which results in the world being switched visually. Additionally, Simulation will call act on the new world.
Animation/Direction problem
By Genota, with 3 replies.
Last reply by danpost, almost 5 years ago:
Genota wrote...
Okay, but now he is just moving infinit to the right and not turning after the counter to the left like before.
Multiply
speed
by
direction
in line 24.
Object should rotate withouth the image
By gfsdhjjks, with 6 replies.
Last reply by danpost, almost 5 years ago:
gfsdhjjks wrote...
somehow my ghost wont rotate anymore at the given points... Eventhough I used getImage().rotate instead of set Rotation.
Do NOT rotate the image. Maybe I misunderstood what you were trying to do. Please explain, in detail, what behavior you are trying to achieve.
calling a method
By Jemy, with 3 replies.
Last reply by danpost, almost 5 years ago:
Jemy wrote...
Please can you show me what you mean?
As an example: <Code Omitted>Note the line 2 calls the
Actor
class method,
setImage(String)
, on an
Actor
type object,
actor
.
Possible Account Deletion
By Alola_Sandslash, with no replies.
I would like for this account to be deleted. Hopefully a moderator could do this for me. Otherwise I am simply abandoning the account.
For loops not working
By BeeSauce, with 1 reply.
Replied to by RcCookie, almost 5 years ago:
I assume "Wait" is initially 0. And 25ms is not a quarter of a second but a fourteeth. You should use 250 there. But that is not the main problem. The thing is the first for-loop can run really quickly, and only if it is very slow (taking the 25ms) it would spawn another instance. The much simpler solution here is using Greenfoot.delay(int) where the number specifies the number of time steps to delay. The lenght of one time step can be adjusted using the ui slider or using Greenfoot.setSpeed(int). Example implementaion:
Automated creation of objects?
By cl0q, with 1 reply.
Replied to by danpost, almost 5 years ago:
cl0q wrote...
I don't want to have to give the names of the objects manually
What do you mean by that?
Problem with GreenfootImage
By cl0q, with 3 replies.
Last reply by danpost, almost 5 years ago:
Remove lines 17 thru 20 and line 22. Then put the following at line 14: <Code Omitted>Finally, swap the usage in
act
of all
move
and
setLocation lines
(or use
setLocation
throughout).
Steam looks weird
By BlueHand, with 1 reply.
Replied to by danpost, almost 5 years ago:
BlueHand wrote...
Because the ball isn't moving, my steam particles are moving to the right. How do I make them move up?
Put the following in your Steam class: <Code Omitted>
Turn if hit wall does not work
By gfsdhjjks, with 2 replies.
Last reply by gfsdhjjks, almost 5 years ago:
danpost wrote...
Shift lines 28 thru 37 up one line (to immediately after line 26). You can also remove line 4.
thanks for ur help
How to make the spawnrate go faster over time?
By KeLLox, with 1 reply.
Replied to by AnJoMorto, almost 5 years ago:
Total DIY code written by a total amateur without testing but if it works it might help you until someone more competent answers: <Code Omitted>
How to add Background Music
By Ajay7heDJ, with 3 replies.
Last reply by danpost, almost 5 years ago:
The
prepare
method needs to be called by the
MyWorld
constructor.
how can I get the world from an empty class?
By Who_TheGreen, with 3 replies.
Last reply by Who_TheGreen, almost 5 years ago:
Thanks a lot, rocket770! It works perfectly, helps me out a lot! Best regards, stay safe and stay healthy!, Who_TheGreen
Restart button class for two different worlds
By AnJoMorto, with 2 replies.
Last reply by AnJoMorto, almost 5 years ago:
Oh I didn't even know that this thing existed. Thank you!
Help with the pause button
By AnJoMorto, with 5 replies.
Last reply by AnJoMorto, almost 5 years ago:
Once again @danpost your help is so appreciated! This works like wonders, and it ended up way prettier than I would ever even think of
81
82
83
84
85
86
87
X