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
Illegal start of expression?
By JamesHughes, with 3 replies.
Last reply by JamesHughes, almost 11 years ago:
Thanks :) that solved that error
BlackJack Tutorial
By Konzuk, with 4 replies.
Last reply by Konzuk, almost 11 years ago:
thank you! It finally works ^^
Need some help with getNeighbours
By Skuggan, with 2 replies.
Last reply by Skuggan, almost 11 years ago:
No, no reason at all I'm afraid. I'm just so new at this that it seemed like a good way to do it. Thank you for your help!
turn one way or another
By 11770, with 2 replies.
Last reply by Super_Hippo, almost 11 years ago:
You can't write it like this. Instead, you can create a new random number and 50% of the time, you turn clockwise and 50% counterclockwise. <Code Omitted>
calling variable from new World subclass
By Alwin_Gerrits, with 13 replies.
Last reply by danpost, almost 11 years ago:
Maybe, instead of creating a new main actor in the new level, you should be using the same main actor. That way any and all states for that actor are not lost. The code could look something like this (although, it would depend on what class you are changing worlds in):: <Code Omitted>This particular code would require that you had a method in your Level2 classes defined as follows (however, it could be defined more specifically as far as the cl
Image isn't appearing...
By BryanGSMST, with 2 replies.
Last reply by Super_Hippo, almost 11 years ago:
I would suggest to comment out line 37 because I don't think that an array can be 'null'.
Variables Reset Glitch
By BlackBench, with 1 reply.
Replied to by danpost, almost 11 years ago:
Every time you create a new Rock object, it, the new Rock object, receives its own 'L' and 'N' fields for its use. If you want all Rock objects to share the same 'L' and 'N' fields, they you need to declare them as static fields: <Code Omitted>Their default initial values will be zero; however, because the values of static fields are retained during resetting of the project, you should explicitly set them to zero in the constructor of your subclass of World, using: <Code Omitted>
Error when Bullet hits Asteroid.
By CKnox, with 2 replies.
Last reply by CKnox, almost 11 years ago:
Thankyou you for pointing that out, I checked my Bullet code and there is no removal code there either. Thankyou
Enemy glitching
By A1234, with 8 replies.
Last reply by A1234, almost 11 years ago:
Yeah, that seemed to fix it and now it is working completely fine. It is strange how that fixed it as before it was glitching like crazy! But thank you again :)
UILibrary scenario question
By murphys, with 4 replies.
Last reply by murphys, almost 11 years ago:
Thank you. The code now works as expected.
Need help
By beginner, with 3 replies.
Last reply by danpost, almost 11 years ago:
Couple of things here (ok, several): * filling the image with white is not necessary; the background image of the world is white by default, so, seeing through the unused portion of the image of the actor is not a problem (you can remove lines 10 and 11 above); * any triangle covering the drawn text will permamently destroy the text unless you draw the text after each triangle is drawn (copy, or move, lines 12 and 13 to line 39; * line 28 has 'img' refer to the image used for the actor; in other words, 'img' and 'getImage()' will both point to the same memory location where the image of the
Start/Stop Music when world is getting loaded.
By DerPonyFreund, with 4 replies.
Last reply by DerPonyFreund, almost 11 years ago:
Okay, thx. I´ll try around a little bit with this.
Need help with Counter!!
By A1234, with 2 replies.
Last reply by A1234, almost 11 years ago:
It works now! Thank you so much!!!
Is it possible to reconstruct World sub classes?
By forteddyt, with 2 replies.
Last reply by forteddyt, almost 11 years ago:
Oh wow, I can't believe I didn't see that method :/. Thanks though, that's exactly what I was looking for. I was messing around with sub-sub classes of World and tried reconstructing it like that, but was calling just "new subSubClass();" instead of "Greenfoot.setWorld(new subSubClass());". Thanks for the quick and simple response! :D
How do i get an image to point the way it is moving?
By JamesHughes, with 10 replies.
Last reply by Alwin_Gerrits, almost 11 years ago:
Obviously you can allso change the image to a mirrored one. You'll just have to put it instead of the getImage line.
We thought the same dan :). I just didn't write it down. But that put aside, I see how your code is better :).
640
641
642
643
644
645
646
X