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
how to recognize a key press. https://www.greenfoot.org/topics#
By Ipurplish, with 4 replies.
Last reply by data17, about 7 years ago:
That means all methods in the class
greenfoot.Greenfoot
works only with the class
Greenfoot
as prefix as danpost explaned! (Example
Greenfoot.setWorld()
,
Greenfoot.getKey()
and so on...) Because they are all
static
. See in the
Greenfoot.API
All other classes in the greenfoot package are non-static methods except some
greenfoot.UserInfo()
methods.
access rotation of another class
By dreyvel, with 2 replies.
Last reply by data17, about 7 years ago:
Good explanation! I like the concept & idea with the world and actors.
Gif crashes game
By PostieMalonie, with 3 replies.
Last reply by danpost, about 7 years ago:
Apparently, you used up memory allotment with too many images. Images, especially large ones or multiple smaller ones, can use up your allotment of memory quickly. Do you create a bunch of actors out of a class using a gif image set?
Need help updating the Health Bar.
By EpicBaller5621, with 13 replies.
Last reply by danpost, about 7 years ago:
EpicBaller5621 wrote...
Yeah, the HealthBar was the culprit. Is there a way to add a counter to make it take away 1 life at a time instead of the health-depleting all the way to zero as soon as it touches the enemy?
Try this: <Code Omitted>
Health is not going down.
By JackVolp5, with 1 reply.
Replied to by danpost, about 7 years ago:
Is it your bullet or your player that has health? Why is
healthP2
in the class of your bullet? As is,
each
bullet created will get a
playerP2
field assigned a value of 100 and when a bullet hits a player, it decreases it to 99 and the bullet is disposed of (along with its
playerP2
field).
Compiling in Greenfoot
By TNesler, with 4 replies.
Last reply by TNesler, about 7 years ago:
My apologies. Not sure how it happened, but I was able to recompile the Trick the Turtle example and it works now. I will look for the termination option when I encounter this problem again.
Get object at location
By Randomness, with 1 reply.
Replied to by danpost, about 7 years ago:
Provided the actor is actually there: <Code Omitted>You can give more specifically what type of object to look for by replacing "
Actor.class
" with some subclass of the
Actor
class.
Error when bullet istouching and set Hp on enemy
By dev4ltar, with 6 replies.
Last reply by dev4ltar, about 7 years ago:
thanks, will try :D
How to use the new Font system???
By Spielkind710, with 1 reply.
Replied to by danpost, about 7 years ago:
Spielkind710 wrote...
I don't know how to use that new font system they integrated in 3.1. I tried to import the classes Font and Color but there is no class to import with these names. Thank you for your help
Oh, but there is and you probably already have them imported -- through the
greenfoot
package. Refer the the greenfoot classes documentation.
Moving Scenery NullPointerException
By The_Beast0007, with 2 replies.
Last reply by The_Beast0007, about 7 years ago:
!AAARGH!! IS IT REALLY THAT SIMPLE I HAD BEEN TRYING TO FIGURE IT OUT FOR OVER 3 HOURS!!!!!!!
YAY! But thank you once again danpost for saving me when I was going to uninstall greenfoot.
Bounce off a round player
By Randomness, with 83 replies.
Last reply by Randomness, about 7 years ago:
I have only one player class so I can't remove the turn(180) just in one player.. edit: I think I fixed it!
sound loop issue
By qwe, with 3 replies.
Last reply by danpost, about 7 years ago:
qwe wrote...
Iv'e tried that, but i keep on receiving errors. How else can I do it?
What errors are you getting? (copy/paste in entirety)
Moving Scenery Troubles
By The_Beast0007, with 2 replies.
Last reply by The_Beast0007, about 7 years ago:
YAY! It worked, thank you so much danpost. I had no idea about the bounded option for worlds!
Bullets travel in a spiral
By tehbestcoder, with 1 reply.
Replied to by danpost, about 7 years ago:
tehbestcoder wrote...
So I want the bullet to turn 18 more than last time when a new one it is created so it becomes a spiral but it doesn't work. I think it won't work like how i coded but i don't know how to make it work. << Image Omitted >> << Code Omitted >>
This was already discussed
here
.
Predicting text bounds
By Zamoht, with 4 replies.
Last reply by Zamoht, about 7 years ago:
I did look at your TextImage solution, which works very well with AWT, but well AWT seems to be the solution and the problem at the same time.
219
220
221
222
223
224
225
X