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
stuck on initializing...?
By nolttr21, with no replies.
I created a
project
, and when I uploaded it to this site it shows a black screen with white text saying initializing... Is there anything I can do to solve this problem?
(Urgent) How do I do a health bar
By SuperAmigo300, with 13 replies.
Last reply by danpost, almost 8 years ago:
ebollinger@sonorahigh.net wrote...
Or you can make difrent health bars
If you mean make multiple health bar classes -- not an idea worth considering. Keep it simple. Have one class to display a bar. Create how ever many bars you need from that one class.
how to creat a scenario
By nora_grey, with 1 reply.
Replied to by danpost, almost 8 years ago:
Download/install the Greenfoot application. Run it and select 'Scenario>New Java Scenario...'; give it a name and click the '
Create
' button and, !voila!, you have created a scenario. Granted, it does not do much (rather, anything); but, you will be on your way. Just add some code (at minimum).
Istouching Method problem
By Ultr0x, with 3 replies.
Last reply by danpost, almost 8 years ago:
You are calling
moveAround
from the constructor, which is executed only once before the created actor is placed into a world.
Zamoht wrote...
Are you calling moveAround() in your MoonLander/Rocket
act() method
?
This question should point you in the right direction to fix the issue.
how to create instance variables
By ericnjaramba, with 3 replies.
Last reply by danpost, almost 8 years ago:
ericnjaramba wrote...
so i checked out that page about variables and ,my question is how to create a variable to keep track of wether the instance is keyboard controlled or moves randomly.
Well, it is either keyboard controlled or not (two possibilities). So, a
boolean
field in the class of the controlled actor seems to be what is needed. If there is a possibility that the controlled actor might change to be a different instance, then an
Actor
field in your
World
subclass could do the trick (or a static one in the class of the controlled actor).
How do I move an object random with a Smooth Mover?
By JamesArnus, with 1 reply.
Replied to by Zamoht, almost 8 years ago:
A way to do this would be to randomly pick a direction. Then create a counter and make the object move in the random direction for <counter> act cycles. When the counter hits 0 you pick a new random direction and fill up the counter again.
app creating
By ebollinger@sonorahigh.net, with 5 replies.
Last reply by ErnieBoi, almost 8 years ago:
davmac wrote...
ErnieBoi: please stop the over-the-top banter and restrict yourself to useful discussion. Thanks.
I WAS NOT OF THE MEANT TO OFFEND, I AM ERNIE WHO IS VERY SORRY
make my frog move
By the_potato99, with 1 reply.
Replied to by Super_Hippo, almost 8 years ago:
Show what you have tried. Make sure you don't only turn the frog in one direction all the time.
Arduino
By Alexlife2002003, with no replies.
ino.sendData so that command i use to send data to arduino but how do i tell arduino to stop?
How do I spawn objects at random locations without risking that they spawn into each other?
By DML, with 1 reply.
Replied to by danpost, almost 8 years ago:
DML wrote...
<< Code Omitted >> In lines 3-12, I defined some stuff that I need for the if-expressions that come later, but unfortunately, I can´t use getX or getY as the objects haven´t been added to the world yet. Adding the content of lines 3-12 into the if-expression would be too late because I need schatzX, schatzY, wandX and wandY for starting the if-expressions in the first place. Do you have any ideas how to fix this problem?
If this is a grid world (cell size not pixel-sized), then you could just make use of the
getObjectsAt
method as you add the actors into the world.
I need to communicate two clases
By SuperAmigo300, with 4 replies.
Last reply by danpost, almost 8 years ago:
SuperAmigo300 wrote...
The codes are above.
You gave your world class codes twice and omitted your Boss class codes.
Gravitation-Simulator
By YuEmAydin, with 2 replies.
Last reply by YuEmAydin, almost 8 years ago:
God damn... Thanks for the answer it was very helpful.
A question about snapping an object to another object
By Monserus, with 1 reply.
Replied to by danpost, almost 8 years ago:
Monserus wrote...
Right now you're able to drag a ship to the field (the tiles where you play on). The problem is, that you're also able to put a ship between multiple tiles (e.g. putting a 2-tile ship in the middle of 4 tiles, which makes it 4 tiles large). A solution to this would be to make ships automatically snap to the tiles where their (mostly) located at. I wanted to know if thats even possible and if so, a short explanation would be really nice.
I will try to explain as best I can. First, let's define a ship of length 2 or 4 to be an even ship and one of length 3 or 5 to b
I have a problem!... pls help me(infinity loop)
By Felix123, with 7 replies.
Last reply by Felix123, almost 8 years ago:
OK thx
How do I interrupt a loop after a certain amount of actors have appeared?
By DML, with 2 replies.
Last reply by DML, almost 8 years ago:
Thank you :) Now it works.
230
231
232
233
234
235
236
X