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
Actor returning null
By dan11, with 2 replies.
Last reply by dan11, over 12 years ago:
Thank you very much, I even did it right in my other scenarios, don't know why I did that here.
Spam
By JetLennit, with 1 reply.
Replied to by davmac, over 12 years ago:
It's spam, plain and simple. As you can see it has been dealt with.
Create a String that disappears when RUN is clicked
By cobarr, with 1 reply.
Replied to by danpost, over 12 years ago:
There is a World class method called 'started'. It is by default an empty method; but is called when the project goes from a stopped state to a running state when that world is the active world. You can override the method in your world class an have it either remove the instruction actor or clear its image. <Code Omitted>
While loop in a world subclass crashes Greenfoot
By sp99, with 3 replies.
Last reply by Super_Hippo, over 12 years ago:
It is infinite since the program will never leave this loop. The 'loop' you want is probably the 'act' method. This is executed every act-cycle.
Choosing file frame
By Kartoffelbrot, with 2 replies.
Last reply by Kartoffelbrot, over 12 years ago:
Thank you!
Dragging desktop icons into a JFrame/Component
By Kartoffelbrot, with 5 replies.
Last reply by Kartoffelbrot, over 12 years ago:
Thank you
How to play your game on a non-school computer
By jmdreyer, with 2 replies.
Last reply by davmac, over 12 years ago:
(In any case, the problem is that you're trying to open a jar or gfar file, but the file contents have already been extracted. Open the project itself - i.e. the extracted folder - not the jar/gfar file).
is there a more efficient way of doing this?
By RUMMAKER, with 5 replies.
Last reply by RUMMAKER, over 12 years ago:
:D thx, danpost. Il keep an eye out.
Gradually increasing speed
By jmdreyer, with 14 replies.
Last reply by jmdreyer, over 12 years ago:
thank you
Incompatible types
By Midas97, with 6 replies.
Last reply by danpost, over 12 years ago:
'getOneIntersectingObject' returns an Object, not a List (or a boolean). You can use 'getIntersectingObjects' which returns a List object (that 'isEmpty' will work on) or you can use change the line to: <Code Omitted>
Make Actor Stop When it Touches Another Actor
By Arichman, with 1 reply.
Replied to by danpost, over 12 years ago:
Basically, when after moving, if it is touching the barrier, move back:
Using enum in greenfoot
By Atlantiz, with 1 reply.
Replied to by davmac, over 12 years ago:
-Xdiags:verbose is a compiler option. Greenfoot doesn't support setting it, so for now you should just ignore it. I believe you only get this when you also get error messages, so you should concentrate on fixing the errors and then this warning will also go away.
Advancing between scenes.
By BeYouself, with 3 replies.
Last reply by danpost, over 12 years ago:
BeYouself wrote...
Thanks a lot. Could you post the code for the Buttons discussion
I have a new BGMusic Actor support class for background music that I want to get out here. I just now got an idea of how I can demo it. I will work on it in the near future.
HELP!!
By molsbex, with 3 replies.
Last reply by danpost, over 12 years ago:
GRIFFIN wrote...
This is the collision code you will want to put in the spider: <Code Omitted>And you probably should specify the type of movement you are looking for.
Lines 1 and 2 above are reversed from what they should be.
getWorld Error
By kdbailey, with 6 replies.
Last reply by Super_Hippo, over 12 years ago:
If you want to do something over timer, you need an 'act' method. If you play at a 'normal' speed, this 300 will be about 5-6 seconds or something. If you want exactly 6 seconds, you can also use the milliseconds from the system which are unaffected by the Greenfoot Speed. But then, the game will be different if you change the speed. So I would suggest to just adjust the 300 to the value you want and try this code:
685
686
687
688
689
690
691
X