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 get one actor to pause for a while when reached a certain point(actor)
By Gerrit, with 19 replies.
Last reply by joandvgv, almost 11 years ago:
Hey! Sorry for the late response, I was trying to fix some other stuff in my code before i was able to implement this one. But it did work, thank you. So, for anyone who needs this i'll let my implementation using danpost idea here:
Is it possible to represent the games in full screen mode?
By Sonic007, with 1 reply.
Replied to by danpost, almost 11 years ago:
Check out
this scenario
.
Abstract Worlds
By RealFighter64, with 12 replies.
Last reply by danpost, almost 11 years ago:
RealFighter64 wrote...
I just tried what you said, replacing any \160s from the code with spaces, and it worked perfectly!
I was going to suggest doing that, but I was not sure if it would work (I had noticed that 160 is 2 to the 7th power, or 128, more than 32, where 32 is the character number for a space).
2 or more enemies
By MIKA, with 9 replies.
Last reply by danpost, almost 11 years ago:
You need to put the code for what you want to do when both tanks are destroyed at line 51 of the Game_World_Level_2 class.
i want to make a game on greenfoot
By Frankeinstine, with 1 reply.
Replied to by FlamingWaters, almost 11 years ago:
So what do you want to do? Did you lose your code? Do you want to make a Mario game? I'm not sure what you are trying to ask.
Grabbing a sound variable from a subclass
By Kirachan, with 2 replies.
Last reply by Kirachan, almost 11 years ago:
thanks man :D
greenfoot game on website
By 60sChallange, with no replies.
How can l put greenfoot game on my website?
difficulty faceing and turning a diraction
By darkspawnwolf, with 1 reply.
Replied to by danpost, almost 11 years ago:
If you follow the logic of the code, you will realize where the problem is coming from. The act method starts with this: <Code Omitted>Now, assume the "w" key is pressed -- this is what happens: The first 'if' condition becomes true and the actor is rotated to 270 degrees and move up one cell. Then the second 'if' condition becomes false and the actor
Can't work out bounding boxes
By h123n, with 1 reply.
Replied to by danpost, almost 11 years ago:
The Actor class has several collision checking methods available that perform in different ways. Maybe you should check out the Actor class API documentation to see what is available because 'getOneObjectAtOffset' may not be the best one to use in this case.
Counter not working (or .getCounter method error)
By NDDR, with 3 replies.
Last reply by NDDR, almost 11 years ago:
It's finally fixed! Thank you very much for the fast reply and for the correcting my errors, danpost. :D
Scrolling Background
By Mrinal, with 4 replies.
Last reply by danpost, almost 11 years ago:
To limit the amount of scrolling, you will need to track the amount of scrolling and then make sure any potential new value is within your set limits. It appears your world is created so that you start in the center of the scrolling area (you will be able to scroll the same amount in all directions before the limit is reached). If the scroll amounts are initialized to zero, then your limits will be at 92 and -92. For limiting a potential new value, I usually do something like this;
What seems to be the problem? Double can not be converted to boolean?
By Mach, with 1 reply.
Replied to by danpost, almost 11 years ago:
In line 10, your 'if' condition is just a numerical expression. It is like saying <Code Omitted>'128.37' is not a true or false value -- it is just a number. Line 11 uses 'c.WHITE'. 'c' is already declared as a Color object. The code may execute properly as is; but, it is poor programming to use an object to get the value of a class field. Better is to just use 'Color.WHITE'. If the code is later changed and the value of 'c' is ever found to be 'null', 'c.WHITE' will throw a NullPointerException while 'Color.WHITE' will not.
How to create an on-screen user guide ?
By andreiyy12, with 1 reply.
Replied to by danpost, almost 11 years ago:
This will work locally (from your system within greenfoot); but, I believe, for security reasons, it will not be allowed to work from the greenfoot site.
public int getTimer
By Jsmoove, with 3 replies.
Last reply by danpost, almost 11 years ago:
The image you attempted to provide shows a 'getTimer' method in the Car class. But, you are trying to call a 'getTimer' method in the
CarWorld
class.
Piano Modified
By kmykyten17, with 4 replies.
Last reply by davmac, almost 11 years ago:
Your code wouldn't compile. Here you're assigning an array to a String variable: <Code Omitted> Did you post your code again, or did you just copy from your previous post and put that between code tags? You need to post it again fully. Your first post is wrong. You can't just copy the text from it.
597
598
599
600
601
602
603
X