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
rectangle creation
By hoothoot, with 4 replies.
Last reply by hoothoot, about 11 years ago:
thanks
Is it possible to create an infinitely expandable scoreboard?
By Stalfoes, with 3 replies.
Last reply by danpost, about 11 years ago:
The range of an 'int' value can be more than twice your given value. Please refer to my
Value Display Tutorial
scenario for instruction on displaying values.
rectangle creation
By hoothoot, with 1 reply.
Replied to by danpost, about 11 years ago:
You should look over the
GreenfootImage class API documentation
.
I can't figure out the importable Scoreboard class
By DoctorMitch, with 2 replies.
Last reply by DoctorMitch, about 11 years ago:
Oh, that makes more sense. I don't really know what I was thinking, I imported the wrong class anyways. Thank you for the info anyways
How can I prevent an object from moving if there is an object in front of it?
By Stalfoes, with 2 replies.
Last reply by Stalfoes, about 11 years ago:
Oh, thanks! But the comment took so long to be validated, I already figured it out. Lol. Thank you anyways!
Problem with each-for
By Vellyxenya, with 9 replies.
Last reply by danpost, about 11 years ago:
Vellyxenya wrote...
It's okay I fixed it, I had a Lifebar that was created every act without being removed^^
I hope you did not fix it by having one Lifebar replacing another (by adding a new one and removing the old one) every act cycle. You should have one Lifebar stay in the world and have its image change only when the number of lives changes.
how can i generate random no. sequences like - __,5,15,20
By sunny, with 2 replies.
Last reply by danpost, about 11 years ago:
One major problem with using the 'for' loop is that the values will change 'NumQues' times without anything being done while they are set to values set prior to the final setting. In other words, the loop can be removed without changing the code. It is equivalent to this (provided 'NumQues' is greater than zero): <Code Omitted>You say it generates the same sequence. This is vague without more information. Some examples of what you want it to generate might help as well.
Making a health bar
By hoothoot, with 5 replies.
Last reply by Zamoht, about 11 years ago:
If you look at my example you can look at the code I wrote for the buttons. The buttons change the value of the health bar, so you can put that code into your player, so health change triggers on other things than button pressing.
why won't "s" work?
By hoothoot, with 2 replies.
Last reply by hoothoot, about 11 years ago:
i figured it out. I just deleted the "s" command and changed the "z" to an "s"
if (sound) setimage
By hoothoot, with 6 replies.
Last reply by hoothoot, about 11 years ago:
i think I understand. thanks for the help
player won't move
By hoothoot, with 8 replies.
Last reply by danpost, about 11 years ago:
hoothoot wrote...
<Code Omitted> that wasn't working so I's taking it out. do you know how I would change my other object's image when cell dies?
It cannot work unless it is called to begin with (it was probably within the 'if' block and was not being called with everything else).
Health not working
By hoothoot, with 5 replies.
Last reply by hoothoot, about 11 years ago:
I'm past it anyways, but thanks for the help.
UserInfo Class
By ilham, with 1 reply.
Replied to by Super_Hippo, about 11 years ago:
If you see a red screen in
this scenario
, then you are probably using Java 8. Accessing and reading UserInfo data isn't possible with Java 8, so 'UserInfo.isStorageAvailable()' returns 'false'. The only way (I know) is to use Java 7 instead.
Most efficient way of scrolling a screen
By TT1103, with 1 reply.
Replied to by Super_Hippo, about 11 years ago:
I guess that it would be more efficient to move them. I don't have proof though. You don't even have to remove them if they go off the screen.
setPaintOrder() not for Classes but for Objects
By edik_192, with 2 replies.
Last reply by edik_192, about 11 years ago:
Thanks. Your variant is good for me. Used: <Code Omitted>
542
543
544
545
546
547
548
X