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 do i make my character "die" after getting out of the world?
By NotABoomer, with 6 replies.
Last reply by NotABoomer, almost 7 years ago:
it now is, thank you for your help :)
Score in GameOver World
By SemDeBakkero, with 26 replies.
Last reply by SemDeBakkero, almost 7 years ago:
THANKS it worked
Health Bar isn't working
By annika.g, with 7 replies.
Last reply by annika.g, almost 7 years ago:
Thank you, its working! :)
Score counter
By BR01, with 1 reply.
Replied to by danpost, almost 7 years ago:
BR01 wrote...
I need help with score counter. GetScore doesn´t work at all.
Cannot help fix unknown codes. Show ALL codes in all classes relating to the counter in question.
enemy throwing objects to the left and right
By MsWoof, with 10 replies.
Last reply by MsWoof, almost 7 years ago:
Thanks! :) You made my day! It's working now, hooray!
drawLine() change color of some lines but not all?
By MaDrexan, with 2 replies.
Last reply by MaDrexan, almost 7 years ago:
@danpost omg thx
Everything stop after score is add. how do i fix it?
By dROS, with 1 reply.
Replied to by danpost, almost 7 years ago:
Move line 41 down a line or two. The
getWorld
call needs to be before that line since when the actor is removed from the world, it will have no world to get.
Keep Object in New World
By HEISENBERG, with 6 replies.
Last reply by danpost, almost 7 years ago:
HEISENBERG wrote...
Well for some reason my player gets stuck at level 2 as the counter gets reset every time
Use the current level to determine what level to proceed to. Something like the following to replace all player codes above:
How to remove object after it reach edge and remove object if it hit another object?
By dROS, with 2 replies.
Last reply by dROS, almost 7 years ago:
Thank you so much for your help
How do I access an object from another class?
By NB111, with 3 replies.
Last reply by danpost, almost 7 years ago:
Nosson1459 wrote...
Also just by way of suggestion you can cut your code by at least half if you use an Array, and For loops to place them in the world. like this: <Code Omitted>to instantiate them use a For loop like this: << Code Omitted >> to add them in to the world use this loop << Code Omitted >>
The quoted line of code should be: <Code Omitted>and I would have done the rest with:
Need help with making an inventory with Singleton pattern and ArrayList
By XardasTheSilent, with 11 replies.
Last reply by XardasTheSilent, almost 7 years ago:
Thank you for the example. I modified my inventory a little and know I have this:
java.lang.NullPointerException NEED HELP!
By Vitalizera, with 3 replies.
Last reply by danpost, almost 7 years ago:
Remove the first word from line 21. You do not want to declare a new variable there. You want to refer to the field declared on line 3.
Showing Text in a Game
By Haylaylo11, with 6 replies.
Last reply by Haylaylo11, almost 7 years ago:
Nevermind, I just figured it out. I feel really dumb, but thanks for your help!
Grabbing Weapons In A Top Down Shooter
By W_JL, with 1 reply.
Replied to by danpost, almost 7 years ago:
W_JL wrote...
I want to make the weapon dissapear after I grab (or should i say touched) it and make it appear on my character. I used if touching and then transparancy to 0 but with that code I can't make the weapon follow my character around because if I touched it. It will dissapear.
True that you cannot have it both disappear and appear at the same time. So ... why make it disappear at all?
Scrolling world with mouse
By mattnorth, with 1 reply.
Replied to by danpost, almost 7 years ago:
mattnorth wrote...
I am making a game similar to Agar.io and I am having issues with my actor following the mouse in the scrolling world. Anyone know how do scroll using the mouse?
Program the actor to follow the mouse without regards to the scrolling. Then, scroll the world depending on the actor's position.
159
160
161
162
163
164
165
X