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
Clara world Exercise issue
By Sammie, with 1 reply.
Replied to by Super_Hippo, about 6 years ago:
You can not link to a file on your computer. If this would work, anyone had access to your computer.
hi i am having a problem with my current mute button
By Weeb.exe, with 5 replies.
Last reply by Weeb.exe, about 6 years ago:
oh ok
Cut Block in Stack game
By AdiBak, with 1 reply.
Replied to by danpost, about 6 years ago:
AdiBak wrote...
I was wondering how to cut/resize a block in the famous stack game?
At time of cut, you can either create and add 2 new blocks and remove the current or you can add 1 new block (the cut part) and scale the current one. Either way, you will have to calculate the locations at which both final blocks need to be placed as their centers will not match up with the original block.
I need help too
By Dominic, with 4 replies.
Last reply by Dominic, about 6 years ago:
oh thank you :)
Cannot find symbol - method getRGB();
By Ryaj987, with 2 replies.
Last reply by Ryaj987, about 6 years ago:
That did it!! Thank you
How would i make an enemy follow me
By Weeb.exe, with 2 replies.
Last reply by Weeb.exe, about 6 years ago:
danpost wrote...
Weeb.exe wrote...
Hi how would i make an enemy follow me and if they detected me they would shoot at me
Confusing. No codes. No attempt.
ok ill try and write a code to show you
NullPointerException?
By bubbadawg, with 2 replies.
Last reply by bubbadawg, about 6 years ago:
I am calling this as part of the constructor for one of my actor classes Edit: You're right. I moved that code to the constructor of my World subclass and it worked when I removed the "getWorld()." in line 6. Thank you!
we have some problems about the fifth scenario super turtel
By bram030, with 8 replies.
Last reply by bram030, about 6 years ago:
thank you guys for you help I will look tomorrow if the problem is solved
HELP
By hhh, with 1 reply.
Replied to by Kostya20052011, about 6 years ago:
The signs ==,>, < are only used in if. You also, if you want to check this condition it is necessary to do so: boolean z; z = getY() > getWorld().getHeight () -50;
I NEED HELP
By hhh, with 2 replies.
Last reply by hhh, about 6 years ago:
ive fixed it now but thanks hhh
Debug
By sillycilly, with 2 replies.
Last reply by RcCookie, about 6 years ago:
Just set a breakpoint and the debugger will open
I NEED HELP
By hhh, with 4 replies.
Last reply by danpost, about 6 years ago:
Kostya20052011 wrote...
I forgot to say that variables are declared before methods, and are used in the method itself, is this an error?
It's not an error. It is just not always necessary. If the variables are assigned new values and only used within the method during the current act step, then it is probably best to declare them within the method. Also, if the variable is only used one in the method, it might be best to use the method call to get the value at the time it is needed and forego declaring a variable for it at all. So, with this:
Is there any way to create a percentage in Greenfoot?
By Pistolenkrebs, with 1 reply.
Replied to by danpost, about 6 years ago:
Pistolenkrebs wrote...
So I wanted to create a Universal Paperclip-like game, and for that I want to exponentially raise the prices of certain objects/upgrades. Is there any way to do so?
Just raise the price by multiplying by one more than the percentage required. That is, to increase by five percent, multiply by 1.05 (or multiply by 105/100).
hi how would i create a timer for a pistol so if i shot i had to wait before shooting again?
By Weeb.exe, with 2 replies.
Last reply by Weeb.exe, about 6 years ago:
ok thank you
Just cannot figure out how to change worlds
By NotGoodAtThis, with 3 replies.
Last reply by danpost, about 6 years ago:
NotGoodAtThis wrote...
Solved that. I moved the world change code to an actor that sits on the world I want to move from.
There is an
act
method defined in the
greenfoot.World
class. You can override it (just like it is done in a class extending
greenfoot.Actor
) in your
TitleScreen
class. It is just not provided by the
World
subclass template as it is when you create a new subclass of
Actor
.
132
133
134
135
136
137
138
X