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
mouseClicked() does not work with getOneIntersectingObject()
By Luvis, with 5 replies.
Last reply by Luvis, over 4 years ago:
danpost wrote...
An aside: you code can be simplified to the following: <Code Omitted>Note the change in what is clicked on ('
null
' in line 2). This is essentially the same as what you originally had because any click anywhere would cause a shot to be fired,
What is wrong with my code
By johnsec, with 4 replies.
Last reply by danpost, over 4 years ago:
<Code Omitted>or <Code Omitted>It will not be 7.
What should be a string seems to have become a list...?
By gd_deception, with 1 reply.
Replied to by danpost, over 4 years ago:
gd_deception wrote...
I am given the error "java.util.List<java.lang.String> cannot be converted to java.lang.String, which I presume means that the parameter I gave when calling the loadFile method was not in fact a string.
Correct -- it is not a
String
object. It is a
List
object that happens to contain one element that happens to be a
String
object. Use: <Code Omitted>This (with the "
.get(0)
") will return (get) the first
String
element from the list.
Return to a previous world
By salim5112, with 2 replies.
Last reply by salim5112, over 4 years ago:
it worked, thanks a lot ;)
can you tell me why it is not working
By Prabhat, with 1 reply.
Replied to by danpost, over 4 years ago:
Prabhat wrote...
can you tell me why it is not working
In what way is it not working (what behavior is being exhibited)? Where is this code (what method; what class)?
BINARY
By ronald, with 16 replies.
Last reply by danpost, over 4 years ago:
ronald wrote...
Do I have to redo a for loop so that I click so that the drawing appears with the green and blue buttons at the same time?
If you have to, just move line 10 from
here
to where you add the buttons.
How to use the show text method
By johnsec, with 2 replies.
Last reply by Gabe1098, over 4 years ago:
johnsec wrote...
How do I use the show text method
or you could make a new class and use this<Code Omitted>
i get a error when trying to use ARRAYS
By Aaron-aid, with 7 replies.
Last reply by danpost, over 4 years ago:
Aaron-aid wrote...
i get the error that actor cant be converted to enemys :c
Okay, use: <Code Omitted>
open greenfoot project in a different ide
By nafridi217, with 1 reply.
Replied to by Aaron-aid, over 4 years ago:
probs not, but you could try to use a stronger machine or plug in your device
Hintergrundmusik per endlosschleife?
By lamerian, with 5 replies.
Last reply by RcCookie, over 4 years ago:
Sorry, habe selber noch nie Sounds in Greenfoot benutzt. Du musst die Klasse GreenfootSound benutzen, nicht Greenfoot: <Code Omitted>
How to display strings
By johnsec, with 1 reply.
Replied to by Super_Hippo, over 4 years ago:
The easiest way is to use the showText method in your world. For example like this: <Code Omitted>
Accessing files on macOS
By lehrerfreund, with 2 replies.
Last reply by lehrerfreund, over 4 years ago:
Yes, thanks, this seems to be working! (Although I have still problems getting the scenario to run, probably this one makes problems: <Code Omitted> … but this is another topic …)
Implement 3 timers for one world controlled from buttons
By nafridi217, with 18 replies.
Last reply by danpost, over 4 years ago:
nafridi217 wrote...
Hey okay so I was able to display the timer but its showing in milliseconds, even though I am using the timer code that I sent you earlier. Can you provide code to display the timer in seconds and also in minutes? thank you for your help.
Please refer to my
Value Display Tutorial
scenario.
How to animate Charakter
By Marcel.0311, with 3 replies.
Last reply by danpost, over 4 years ago:
Marcel.0311 wrote...
Ok , i somewhat understood your code but where to i have to tell what images i want to use?
See comment at end of line 2.
timer code
By siizwee, with 3 replies.
Last reply by danpost, over 4 years ago:
siizwee wrote...
do i have to initialise the simpleTime class?
You don't need that class unless you want the timer to be shown on the screen.
56
57
58
59
60
61
62
X