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
Issue with calling sub-programs from another class
By Legitimacy, with 1 reply.
Replied to by Legitimacy, over 7 years ago:
the bolded line didn't work within the code but the line I was pointing out starts with <Code Omitted> and ends with <Code Omitted>.
how do i change my dp
By bully12345, with 1 reply.
Replied to by bully12345, over 7 years ago:
nvm i found it
How to use "Actor stone = (Actor)getWorld().getObjects(Stone.class).get(0) " for multiple Actors
By lm_s, with 2 replies.
Last reply by lm_s, over 7 years ago:
Thank you for your answer! Both versions are working well.
Shooting in Multi-Player mode
By KSH-Aeppli, with 2 replies.
Last reply by KSH-Aeppli, over 7 years ago:
Thank you, this works perfectly!
Score not showing up on separate worlds
By Nate2002, with 7 replies.
Last reply by danpost, over 7 years ago:
Nate2002 wrote...
World2: <Code Omitted>
Really? The first two lines are fields -- the others are execution code. And why would you create a
World2
object from within a
World2
world? Remove lines 3 through 5 here in World2.
Incompatible types for boomWorld = getWorld();
By Notted, with 3 replies.
Last reply by Notted, over 7 years ago:
Thanks, guys.
how to recognize a key press. https://www.greenfoot.org/topics#
By Ipurplish, with 4 replies.
Last reply by data17, over 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, over 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, over 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, over 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, over 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, over 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, over 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, over 7 years ago:
thanks, will try :D
How to use the new Font system???
By Spielkind710, with 1 reply.
Replied to by danpost, over 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.
220
221
222
223
224
225
226
X