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
Installation problems
By carlsora, with 1 reply.
Replied to by XxCelosiaxX, about 11 years ago:
Try sending an email directly to Greenfoot see this link
http://www.greenfoot.org/support
Null Pointer Exception
By Jasonertia, with 1 reply.
Replied to by davmac, about 11 years ago:
Is the first piece of code you posted the code for the "Space" class? According to the stack trace, the exception occurs on line 92. Which line is line 92?
Using a Non-default Constructor with an Actor?
By decadence18, with 7 replies.
Last reply by danpost, about 11 years ago:
To help: anytime you add a non-default constructor to a class, you forfeit direct access to the default constructor of its superclass. You could add the following to the class to regain access to it ( class name is 'ClassName' ): <Code Omitted>If you needed to have the default constructor run and then do other things specific to the subclass you can insert that code after line 3 above.
Help a Newbie!!
By FrancesDG, with 1 reply.
Replied to by ElNo, about 11 years ago:
Hi, your question is to unspecific. Giving you the whole instruction of how to wirte this game would be to much for this form, you will need to start writing your ideas and code first and then ask more specific questions. I recommend you start with the tutorials on this side first
Tutorials for Wombats ant Little Crab
. This will give you the first input how to wirte a game in Greenfoot. Both have a lot in common with your pacman game: an actor of some kind removes something from the world and in the end there are even enemies. If you have under
isKeyDown() not working on the website
By Paulsmlim, with 7 replies.
Last reply by Paulsmlim, about 11 years ago:
Sorry I did not provide this code before, but it does remove the shielding once the "q" key is not down. The code for shielding() is
My scenario wont export to a jar file.
By ando600, with 6 replies.
Last reply by lordhershey, about 11 years ago:
I'd ask the instructor or lab assistant if they are willing to help . To get a jar I click the Export Button then select Application - take note of where it wants to drop the file. If you do an export to web page you get a directory with a html file and 2 jar files, if you are missing one of those jar files you will not be able to view the html file. Can you take a screen shot of the export option and shoot an email to me - I have bobo@lordhershey.com
Need Help with Greenfoot.mouseClicked();
By Newbie, with 3 replies.
Last reply by danpost, about 11 years ago:
The code given looks okay -- other than a slight improvement that could be made: change 'Profile.class' in line 16 to 'this'. This will probably not solve your issue. If it does not, pause the scenario and right click on the object you were trying to change the image and select 'Inspect' from the pop-up menu to see if it is actually a Profile object. Post back all results of these tests.
Help with objects moving continuously in the y axis?
By pleasehelpme, with 13 replies.
Last reply by JoaoV10, about 11 years ago:
danpost wrote...
JoaoV10 wrote...
Yes, I tried, but the object is not constantly moving in a coordinated to another
Why don't you show what you tried (if you want us to help)? Showing the entire class helps to make things go a lot quicker in helping, also.
I did so: setRotation(90) move(4) if(isTouching(Obs1.class)) move(-4) My intention is that when you hit the Obs4 (which is an obstacle created), the pedestrian change the direction coming back, and then when you hit another obstacle back again, thus making a path still
getOneObjectAtOffset() query
By davemib123, with 2 replies.
Last reply by davemib123, about 11 years ago:
great! just what i wanted :)
Kinect OS Maverick
By Alexia, with no replies.
Please I need help in installing Kinectserver using kinectserver-1.2m2 marks the following error: clang: error: no such file or directory: '/opt/local/lib/libboost_thread-mt.a' clang: error: no such file or directory: '/opt/local/lib/libboost_atomic-mt.a' make: *** Error 1 Someone will have these files. Please
Is it possible to get 6 different random numbers?
By decadence18, with 7 replies.
Last reply by decadence18, about 11 years ago:
Alright, thank you @danpost and @Super_Hippo for your help. I think I'll implement something similar to the array of images; as far as the animation goes, I think I'll just have it cycle through each numeric image for 10 ticks and then end on the Standby image.
Help with Hangman?
By Pineapple, with 1 reply.
Replied to by danpost, about 11 years ago:
Use 'nextInt(2)' in line 19.
Problems with Math.sin()
By yolomilk, with 2 replies.
Last reply by davmac, about 11 years ago:
(You can also use the 'Math.toRadians()' method, which does the same thing:) <Code Omitted>
Board Game Piece Movement
By Programmer1998, with 5 replies.
Last reply by danpost, about 11 years ago:
Programmer1998 wrote...
The logic class is just a new class (is under "other classes"). All of game's rules and logic is put into this class. I called it CheckersLogic.
Oh, okay. Good for you! Most newer greenfoot programmers tend to refrain from creating classes that are neither World or Actor subclasses. In fact, I have quite frequently found that they create classes like this as a subclass of Actor and add it into the world (sometimes even with a greenfoot icon showing as its image). If this is a checkers game, then the way you set your logic up in your 'canMove' and 'canJump'
Help me please.
By iCodeAsian, with 4 replies.
Last reply by Super_Hippo, about 11 years ago:
It is still related to the same code. You have this line: <Code Omitted>In order to have different sized stars, you could get a random number instead of the '2'. So for example: <Code Omitted>
525
526
527
528
529
530
531
X