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
Using setLocation() or some variant with doubles?
By GreenGoo, with 12 replies.
Last reply by GreenGoo, over 12 years ago:
Okay thanks for the help, I've found it. Yeah that code was very very rough, I just wanted to get some idea of what I should do and see how it looked. Thanks again!
Collision Detection Issues
By ddemarco06, with 68 replies.
Last reply by danpost, over 12 years ago:
Maybe you should show what code you are using in your space world and your congratulations screen class.
Greenfoot download
By RickMurphy, with 2 replies.
Last reply by lordhershey, over 12 years ago:
I think they do not understand that all of this sits on top of Java, and I took it as a give up message. :/
'n must be positive' error
By Dab1001, with 2 replies.
Last reply by Dab1001, over 12 years ago:
danpost wrote...
If the rotation is greater than 199, which will occur when you think the rotation is between -160 and -1, then you will be trying to get a random number using an argument less than one; hence the error. The rotation returned using the Actor class method 'getRotation' will be a number between zero and 359, inclusive. You should reformulate your maths based on this. Maybe use something like this for line 53: <Code Omitted>Between -90 and -1 (or 270 and 359), dripSpawnChance will be between 10 and 99. Between 0 and 180, dripSpawnChanc
Referencing 'Other Classes'-type Classes in Worlds
By Dab1001, with 6 replies.
Last reply by Dab1001, over 12 years ago:
danpost wrote...
I think you would need to add an instance Boolean and set it when the button is found pressed and unset it when a click action for that button is detected. I have not tested it out completely, but something like:
Specific Location
By roeilthegreat, with 4 replies.
Last reply by roeilthegreat, over 12 years ago:
Wow. That code works exactly how I originally imagined my scene. Thanks a lot!
Need Help Shifting Health Between Levels
By BobFisher3, with 5 replies.
Last reply by danpost, over 12 years ago:
FYI, I have a
Super Level Support Class
you may be interested in looking over. It illustrates some of the things reviewed here.
How do i move up/down while replacing the sprite
By seandoesftw, with 1 reply.
Replied to by danpost, over 12 years ago:
I would first suggest not to have four different actors for one character. All you need to do is change the image of the character to one of the four images by using 'setImage' when a new direction is detected. As far as not being able to have your character change to a back sprite and move that way ... your 'charback' class would need posted as the problem is probably there. Please use the 'code' link below the 'Post a reply' box to insert your code into your future posts.
Java runtime envoirnment missing, and won't install.
By Entity1037, with 1 reply.
Replied to by lordhershey, over 12 years ago:
Is java disabled on the machine? The update button should only take you to the Oracle java page.
how do i do the tutorial
By cwfrock, with 1 reply.
Replied to by Entity1037, over 12 years ago:
You can't. You can ask a mod or admin to, though (although it's not like leaving this post here is a big deal).
Need Help With HealthBar by Sharing Variables
By BobFisher3, with 12 replies.
Last reply by BobFisher3, over 12 years ago:
No need, fixed it :D
I'm Korean User. But I can't compile on 2.4.0 version
By won0c, with 4 replies.
Last reply by davmac, over 12 years ago:
ps. Why is "bluej.vm.args=-Xincgc -Dawt.useSystemAAFontSettings=on" necessary? What is the purpose of this?
This is two settings: -Xincgc : use the incremental garbage collector, to try and reduce noticable pauses while Greenfoot is running -Dawt.useSystemAAFontSettings=on : forces text rendering to be anti-aliased. This is the one that seems to cause your problem, but it shouldn't. See
here
for documentation on this setting. If text is not anti-aliased, it generally looks much worse.
Code for a bouncing ball
By M.Hussain, with 3 replies.
Last reply by danpost, over 12 years ago:
You need to provide what code you have so far (at least as far as the ball and its ground/object detection). However, for gravity: <Code Omitted>
setColor won't work
By getreides, with 12 replies.
Last reply by getreides, over 12 years ago:
Wow, you never cease to amaze me :-). I will work on the code in the days to come; first of all, I will implement vector movement (that will make (3) superfluous - this was a somewhat awkward way to simulate gravity, and I kept trying various values until I got fed up with it and left line 30 the way it was at that moment).
Collision Detection
By Dab1001, with 2 replies.
Last reply by Dab1001, over 12 years ago:
Super_Hippo wrote...
<Code Omitted>But I am not sure if this will change anything. By the way, instead of your step by step, you could change line 44 and following to (and similar with the other ones).
659
660
661
662
663
664
665
X