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
Help with Lists
By sengst, with 2 replies.
Last reply by sengst, over 9 years ago:
Thank you very much for your help!
Putting a actor in another world (text)
By KrystalLo, with 23 replies.
Last reply by danpost, over 9 years ago:
No. More like this: <Code Omitted>
Turning Towards the Mouse
By sengst, with 4 replies.
Last reply by sengst, over 9 years ago:
Thank you for all of your help! It seems that i have found my own way of solving the problem, though probably a round-about way of doing so. Once again thank you for you continuous help.
Help With Danpost's Infinite Scrolling Background
By tuckalow, with 3 replies.
Last reply by danpost, over 9 years ago:
You could create an unbounded world by adding a 'false' parameter in the super call to the World class: public World(int width, int height, int cellsize, boolean bounded) The above line is the signature of an alternate constructor for the World class which allows you to state whether the world is bounded (prevents actors from leaving the world window) or unbounded (allowing actors to go beyond the limits of the window). So, for example: <Code Omitted>
Subclass of subclass of World not constructed?
By vtn2@calvin.edu, with 2 replies.
Last reply by vtn2@calvin.edu, over 9 years ago:
Thanks. Running new VicWorld() did help. The Inspect said it did know that it was a VicWorld object.
title screen
By benbec1, with 2 replies.
Last reply by benbec1, over 9 years ago:
Thank you so much my game works now
Destroying two enemies
By Amelfa, with 1 reply.
Replied to by danpost, over 9 years ago:
What the error is saying is that after you hit an asteroid and the bullet is removed from the world, you cannot then try to find an intersecting Enemy1 object. You cannot look for any intersecting object to an object that is not in the world (the bullet was removed). Change line 12 to this: <Code Omitted>This will ensure that the bullet is still in the world when checking for an intersecting Enemy1 object.
Bluej configuration in Eclipse
By DHEERAJ, with no replies.
I have successfully built the ant build configuration of the bluej in eclipse,but if i run the project i am getting the import threadchecker can not be resolved error as shown in the image <Image Omitted> <Image Omitted> Please help me
Counter Points is not updating
By KrystalLo, with 4 replies.
Last reply by KrystalLo, over 9 years ago:
Ah sorry for the late reply, its working. Thank you alot Dan! :D
get another objects rotation and location
By ashjim999, with 14 replies.
Last reply by SPower, over 9 years ago:
First, I'm not entirely sure about this: <Code Omitted>I don't know how you've defined the getDirection method, but simply using cannonbarrel.getRotation() might be easier. If that doesn't fix it, I suspect it's a problem with the precision in movement. Try to use the SmoothMover class to track the position and such (you can import that class into your project from Greenfoot).
NullExceptionPointer
By Link99, with 1 reply.
Replied to by danpost, over 9 years ago:
Just because a project compiles, it does not mean that you will not get any errors. Compiling will catch syntax error (spelling, punctuation and use of symbols) as well as things like accessibility of methods and fields and proper type-casting of elements within the code. But there are some errors that the compiler cannot predict on. These are called run-time errors. In java, these are called "exceptions". Anytime an exception is thrown, it is either caught (by code created specifically designed to detect the error) or it is not caught and the scenario is terminated and a message will be
Roundabout traffic Problem
By Rabe123, with 4 replies.
Last reply by danpost, over 9 years ago:
Rabe123 wrote...
ok but i dont know how i should do it. How can i make a method for the auto that looks if there (on the other radius) is a bus or car without the touching, inRage or Neighbours method ?
I was not suggesting that you not use any of those methods -- I was suggesting that you use one of those methods (most probably the 'getObjectsInRange' method); but only after re-locating the auto to potential future locations. After performing the check, you would move the auto back to where it was moved from, if a collision was found to occur. So, for example, a method to change lane
Accessing variables from other actors
By mattjames, with 12 replies.
Last reply by danpost, over 9 years ago:
Communazi wrote...
Yeah i am getting the same error as SnapDraggen. any other threads that seem to have the right idea?
Guys, you should have seen the following above:
danpost wrote...
You may have to check that 'getObjects(Sharing.class)' does not return an empty list before calling 'getShared' on an element of it.
By not following this you may get an IndexOutOfBoundsException run-time error.
Adding objects to a List
By sengst, with 4 replies.
Last reply by sengst, over 9 years ago:
Thank you very much! You have been a great help.
Resizing an animated GIF
By Communazi, with 4 replies.
Last reply by danpost, over 9 years ago:
Communazi wrote...
Sorry, follow up question. in place of "images" i would use the name of the class (the class acting as a GIF)?
No. You would use it exactly as is. The GifImage class contains a private GreenfootImage array with the name 'images' that holds the individual images of the gif. That is what is being referred to here.
456
457
458
459
460
461
462
X