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 you invoke methods on array?
By orangutan, with 1 reply.
Replied to by Super_Hippo, over 10 years ago:
So you want to mirror a set of images? <Code Omitted>
No "Compile" button in my Greenfoot.
By mihinduep, with 5 replies.
Last reply by mihinduep, over 10 years ago:
@danpost when I open my Greenfoot program a message come in a new window. It has been coming since the first time I installed it. The message is - "Device "Intel(R) G41 Express Chipset (Microsoft Corporation - WDDM 1.1)" (\\.\DISPLAY1) initialization failed : WARNING: bad driver version detected, device disabled. Please update your driver to at least version 8.15.10.2302 What is this? Is this why no scenario window open when I click new scenario. Please I really want to learn Java.
Making bullets fire in different directions
By GodlikeStorm, with 3 replies.
Last reply by Super_Hippo, over 10 years ago:
Sorry, it's this: <Code Omitted>It's not a variable, it's a method. The '()' was missing.
Actor follow same direction as another
By Maimoce, with 1 reply.
Replied to by Super_Hippo, over 10 years ago:
Do you mean that if a bullet is flying to the right side, the asteroid should go to the right side after the bullet hits the asteroid? So like this? <Code Omitted>
How do you check if an object is in the world?
By thmysdar, with 2 replies.
Last reply by danpost, over 10 years ago:
The 'getWorld' method will return one of two things for an Actor object -- either the world the actor is in or 'null', if not in a world. So checking for 'null' will return a 'true' value if the actor is not in a world and checking for 'not null' will return 'true' if the actor is in a world: <Code Omitted>
why can't i make this work
By krieos, with 2 replies.
Last reply by danpost, over 10 years ago:
Presuming you type the code into your post and you missed the space between 'private' and 'void', and presuming that the first and last close squiggly brackets are properly paired with another block of code (above) and the end of the class (below), then the code should work and the problem may be at a more general level. You should be more specific as far as the issue in your posts. Saying 'why can't i make it work' if very vague. How is it not working (what results are you getting)? How should it work (what results should you be getting -- here, it is quite obvious with the code itself)
help with question level advancement?
By keeganlink29, with 1 reply.
Replied to by danpost, over 10 years ago:
Put your questions in an array. Use a Level superclass for your different labarynth worlds and assign each level a value that can be accessed by the actor to use as an index for the question to ask. For help on specific issues on this, post a reply here. You could review the code (or even import my Level superclass for use in your scenario) of my
Super Level Support Class
scenario for help.
Null Pointer Exception when accessing the world class from an actor subclass
By Kraken, with 1 reply.
Replied to by danpost, over 10 years ago:
Which line is being highlighted on the error? If it is line 2, then your actor may have been removed from the world before executing the line. If line 3, then 'myWorld' either was not assigned anything or it was assigned a 'null' value.
How can i add text in Greenfoot?
By Singunner, with 2 replies.
Last reply by Singunner, over 10 years ago:
ok, I will try
Help with averaging a string/array of numbers?
By Dylan1999, with 7 replies.
Last reply by danpost, over 10 years ago:
Dylan1999 wrote...
Okay, I'm no longer getting an incompatible type error nor a syntax error. However, I'm getting an Out of Bounds error with: < Code Omitted >
Well your iterator is being used for indexing, not for the number itself (as I had used it for above). The 'for' line should be: <Code Omitted>and the 'drawstring' line should be outside the loop (after the next closing squiggly bracket) and should display something like "The average value of the "+numbers.length+" numbers is "+(sum/numbers.length)
Strange keyboard behavior
By TinyTertle, with 4 replies.
Last reply by TinyTertle, over 10 years ago:
I really like the idea of keeping the down keys in an array! This should work. Thanks for the help!
How can I remove drawn lines?
By TinyTertle, with 4 replies.
Last reply by TinyTertle, over 10 years ago:
Haha, yeah I'll definitely just stick to wrapping the image into an Actor object. I appreciate the time and effort though!
Public boolean help?
By OrientalCarpet, with 5 replies.
Last reply by danpost, over 10 years ago:
OrientalCarpet wrote...
I am using an actor subclass for it
You could ask if the world has the title screen showing or not with something like the following in the World subclass act method (I will call your actor subclasses TitleScreen and GameOver): <Code Omitted>The will cause a ball to spawn only while the game is in progress. If the title screen actor or the game over actor is in the world, or a ball is already in the world, no
This may seem like a stupid question but how do you save music and images on Mac?
By Coolguyawesome2, with 1 reply.
Replied to by danpost, over 10 years ago:
Your project folder should have two sub-folders within it. One, called 'images' (to hold the images for that project) and one called 'sounds' (for any music or sound files for the project). Sound files need to be moved into the 'sounds' folder using your file browser; but, images can be imported (right click on the class and select 'setImage...' and click the 'Import from file...' button to browse.
Greenfoot objects touching in world
By thmysdar, with 4 replies.
Last reply by thmysdar, over 10 years ago:
THANK YOU SO MUCH
479
480
481
482
483
484
485
X