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
Problems with Greenfoot.delay()
By olenz, with 17 replies.
Last reply by olenz, over 10 years ago:
Indeed, that seems to work! Nice workaround, thanks!
Adding values of the array?
By elementa, with 1 reply.
Replied to by danpost, over 10 years ago:
First thing, I do not see any place where you are actually changing the image. Line 2 assigns an image to the field 'displaytext' and line 5 continuously sets that image to the DisplayText object (the assignment of the image to the field is done once when the DisplayText object is created). Second thing, The image does not have to be continuously set in the act method. In fact, the DisplayText object does not have any actions to perform -- it just sits there in the world displaying its image, not doing anything in particular. The only time any changes occur to it is when a door is pressed,
Actor changes color when mirrorHorizontally is called
By Tokinator420, with 1 reply.
Replied to by danpost, over 10 years ago:
That is a known issue and is believed to be a bug in JDK 7. As an alternative, you can use the following method which I created because of this issue: <Code Omitted>
Non-Static Method ??
By elementa, with 3 replies.
Last reply by elementa, over 10 years ago:
Oh, I understand ! Thank you so much!
Having trubble with only one side of my collision code
By EnderPicture, with 7 replies.
Last reply by EnderPicture, over 10 years ago:
I really would like to have a versatile core so there will be more level design options and possibilities. Having each side of the collision system run all the time will allow me the use moving platforms pushers and also moving coin blocks ice blocks ext.
Help: is there any way to have a "dead spot" that actors can't enter?
By decadence18, with 8 replies.
Last reply by decadence18, over 10 years ago:
I got it to work. I had to use: <Code Omitted>
Actor geht nicht ins feld
By Jens3399, with 2 replies.
Last reply by xFabi, over 10 years ago:
Falls du das nicht verstanden hast, du wirst wahrscheinlich eine Methode wie getx() benutzt haben, das geht nicht Wenn dein Objekt nicht In der Welt ist Solche Fehler entstehen meistens wenn man das Objekt löscht(zB weil es angegriffen wird) und dann besagte Methode benutzt
Uses of....
By DemonsWhiteSoul, with 3 replies.
Last reply by danpost, over 10 years ago:
DemonsWhiteSoul wrote...
Ohhh, so for example, it could be used to make solid objects like a wall?
No -- it cannot be used to make any objects. Maybe you meant to say it could be used to check for objects that need to be avoided (which would then make those objects obstacles like walls. Well, then, I guess so. It could be used to determine if a specific object is at the offset. Like in chess, a pawn can only move directly forward if the square in front of it is empty. You could use it to check that particular square for any piece being located there, for one instance of its use.
Importing colors into Greenfoot.
By sprinty200, with 1 reply.
Replied to by danpost, over 10 years ago:
It probably has something to deal with where you are inserting the import line into your code. Usually, import lines are at the top of the class with no indentation and outside of any and all brackets. If you cannot resolve the issue, post the code you are trying. Use the 'code' link below the reply box to insert code into your post. Also, ensure the line before where you are placing it is ended properly.
How to make multiple choice quiz with string arrays?
By Jamiah_DeShawn, with 5 replies.
Last reply by danpost, over 10 years ago:
Maybe the java tutorial page on
Arrays
might help.
Command doesn't work + don't know how to use a command
By beliuga, with 13 replies.
Last reply by danpost, over 10 years ago:
First, I will try to make things a little easier (so you do not have to keep copy/pasting code from one class to another). Create a new subclass of Actor and call it 'Lily' and instead of having the 3 classes, lily1, lily2 and lily3 extend Actor, have them extend the new Lily class. Next, create a new subclass of Actor called 'Obstacle' and instead of the 3 classes, bigbarrier, smallbarrier and barrier extend Actor, have them extend the new Obstacle class. Now, the reason I suggest this for the lily classes is so you only need to create the code once for all three classes by putting the cod
Infinite Side Scroller Implementation
By Smolitor, with 3 replies.
Last reply by danpost, over 10 years ago:
Smolitor wrote...
By the way, are you in any way affiliated the
DAN-BALL
website?
Never heard of it.
Making your very own images?
By DiplomatikCow, with 3 replies.
Last reply by DiplomatikCow, over 10 years ago:
Thank you, for helping me with this and all my questions :D I will go use that
Help needed Damage when touching another
By Thanatos, with 1 reply.
Replied to by danpost, over 10 years ago:
Please bookend your code with code tags. Click on the link that says
'Posting code? read this!'
for an explanation. The third and fourth lines (the one beginning with 'Actor' can be removed. The variables declared there are not being used in the method. The second 'if' block should be inside and at the end of the first 'if' block. You only need to check the value only after it decreases, not every act cycle. Other than that, is should still work as you had it, except that the health will drop in bunches. Each contact will probably
Generate random objects on specific locations
By h35am, with 11 replies.
Last reply by danpost, over 10 years ago:
Ruvero wrote...
For example: <Code Omitted>Will generate a number between 0 and 3.
That is not correct. That line of code will only generate a number between 0 and 2, giving the 3 possibilities { 0, 1, 2 }.
610
611
612
613
614
615
616
X