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
Logic errors(?). boomArea no checking to see if bomb has hit class
By Notted, with 17 replies.
Last reply by Notted, almost 7 years ago:
Thanks!
我到底那里错了?
By NanyuKe, with no replies.
<Code Omitted>
Highscores
By ant, with 2 replies.
Last reply by data17, almost 7 years ago:
With this method you can read the highscore file: <Code Omitted>
Problem with the removing of something
By Tommes, with 3 replies.
Last reply by danpost, almost 7 years ago:
Tommes wrote...
Thank you, you are my hero!
And you are my 500th fan (follower). Thank you.
Colordetection
By xandreas_1, with 6 replies.
Last reply by danpost, almost 7 years ago:
xandreas_1 wrote...
Is there a way to get a scrolling background in the worldclass while pressing w and s for forwards and backwards?
See my
Scroller Class Demos
scenario.
Answer for Q2: Size World(1500, 750, 1) Size Background Actor(1500px x 210px) Localisation Background Actor(750, 650)
Would take a bit of calculating to just figure out which pixel in the background image would need to be looked at.
I should mentioned some facts about my game: One of my Actorclasses is my scrollingbackground(not with the col
Issue with calling sub-programs from another class
By Legitimacy, with 1 reply.
Replied to by Legitimacy, almost 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, almost 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, almost 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, almost 7 years ago:
Thank you, this works perfectly!
Score not showing up on separate worlds
By Nate2002, with 7 replies.
Last reply by danpost, almost 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, almost 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, almost 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, almost 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, almost 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, almost 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>
218
219
220
221
222
223
224
X