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 to use the show text method
By johnsec, with 2 replies.
Last reply by Gabe1098, about 3 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, about 3 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, about 3 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, about 3 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, about 3 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, about 3 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, about 3 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, about 3 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, about 3 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.
Create GreenfootImage from webcam?
By proGuest_0, with no replies.
Is it possible to create a GreenfootImage from a computer webcam?
How to save the current instance of a world to be able to pass into other world classes
By Cs-studentX, with 5 replies.
Last reply by danpost, about 3 years ago:
Okay. In all your world constructors, you are calling
prepare
prior
to setting the
mazeWorld
field. It is no wonder the field values in your
Actor
objects are
null
.
How to add strings
By johnsec, with 1 reply.
Replied to by danpost, about 3 years ago:
johnsec wrote...
I am trying to add these two strings together. How am I able to do that
<Code Omitted>
getWorld().addObject isnt working
By Sombra, with 3 replies.
Last reply by danpost, about 3 years ago:
Sombra wrote...
Thx a lot,and I appreciate seeing you in every post
Actually, you can completely remove the line that was incomplete since you create another object of that type to add to the world in the next line. The "problem" with the act method in general still would need resolved.
MouseClicked(this) does not work
By jeppe9756, with 1 reply.
Replied to by danpost, about 3 years ago:
jeppe9756 wrote...
the mouseClicked statement just works in a weird way
You probably have one or more objects that are over top of the button. When weirdness occurs, pause the scenario and right-click on the button to see what type actors are at that location. A possible fix is to add the following line to your world constructor: <Code Omitted>
How to make a variable that can access from any class
By Gabe1098, with 7 replies.
Last reply by danpost, about 3 years ago:
Gabe1098 wrote...
I meant if ((MyWorld)World()).score > 60
You cannot use that if the
score
is in the
Snake
class. You must get a reference to the
Snake
object and use it (instead of a reference to the
World
object). You may want to keep a reference to the
Snake
object in your
World
subclass: <Code Omitted>Then you can use:
((MyWorld)getWorld()).snake.score
for the score. Also, this way, the score is not lost upon removing the snake from the world.
50
51
52
53
54
55
56
X