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
Need help please
By Saveseals2, with no replies.
<Code Omitted>
How to use intersects() method
By BackFlip125, with 4 replies.
Last reply by danpost, over 6 years ago:
BackFlip125 wrote...
yes it should repeat for each time the car intersects the oil slick. sorry if that was misleading
Maybe a misunderstanding here. I did not mean each time the car intersects (hits, or first comes in contact) with an oil slick. I meant the continuous intersecting of the same hit. For one car/oil slick collision, there will be some time of interaction. This will most undoubtedly take a number of act cycles. I was asking if these things that you want done, we to be executed once per collision (regardless of how long the intersecting lasts) or executed once for each
A quick question
By cesarinstalled, with 1 reply.
Replied to by danpost, over 6 years ago:
cesarinstalled wrote...
Hello. I was recently asked the question on why does move go next to Greenfoot.delay and not under it. I know it acts differently but i do not know the proper terminology to explain.
Please show an example of what you are referring to (definitely not explained well).
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, over 6 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, over 6 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, over 6 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, over 6 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, over 6 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, over 6 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, over 6 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, over 6 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, over 6 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, over 6 years ago:
God damn... Thanks for the answer it was very helpful.
227
228
229
230
231
232
233
X