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
Scrolling Background
By Mrinal, with 4 replies.
Last reply by danpost, over 10 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, over 10 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, over 10 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, over 10 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, over 10 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.
Help with adding actors to the world after removing them
By SB2612, with 1 reply.
Replied to by danpost, over 10 years ago:
The World class has a 'getObjects' method that returns a List object. If the List object is empty, then no instances of the Class provided were in the world.
Can I scale an image if it is not the default image for the class?
By Kendall, with 2 replies.
Last reply by danpost, over 10 years ago:
To answer the question in the title of the discussion, yes. I will use "anvil.png" as the filename of the image. <Code Omitted>Of course, the '50' that was used to reduce the image to half width and half height could be changed to any positive value.
Bullet and Score
By pr2alede, with 4 replies.
Last reply by danpost, over 10 years ago:
danpost wrote...
The code in question is your World subclass code
Please post the code in question.
planet get
By gr8n8, with 4 replies.
Last reply by gr8n8, over 10 years ago:
thank you, I love you
its giving me a incompatible types error... any fixes to this?
By Majorzack, with 9 replies.
Last reply by patterperson, over 10 years ago:
danpost please contact patterperson . I am also retired, short on money, and want to interest you in a joint project.
Enquiry
By Abanourmo, with 16 replies.
Last reply by Abanourmo, over 10 years ago:
You have helped me a lot. Thank you for your time ;-) I really appreciate your help. thank you again
Accepting user input
By craigsapp6395, with 1 reply.
Replied to by danpost, over 10 years ago:
What type of data needs stored? Is there a specific format for this data? Are you able to create a proper List object or is that what you are having problems with? Of course, all these questions might be answered by just showing what you tried -- in code.
My Maze
By ShaunThompson12, with 4 replies.
Last reply by ShaunThompson12, over 10 years ago:
Thank you for your help but I figured it out
Cant update Info from a methods
By joandvgv, with 4 replies.
Last reply by joandvgv, over 10 years ago:
Ok! Thank you so much. I'll try and let you know how that goes.
From Greenfoot to "real" programming?
By ds06, with 2 replies.
Last reply by ds06, over 10 years ago:
Great thanks, ill read into that. If i have any questions i come back to this thread :)
597
598
599
600
601
602
603
X