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
Problem with java.awt.Color and java.awt.Font
By ryan22, with 1 reply.
Replied to by danpost, almost 9 years ago:
The newer versions of greenfoot have the 'setColor' and 'setFont' methods using parameters of type 'greenfoot.Color' and 'greenfoot.Font'. Remove the import lines 3 and 4 and replace 'Font.PLAIN' on line 14 with 'false, false' to conform to the 'greenfoot.Font' constructor.
Problem with non-random actors
By Beamer, with 6 replies.
Last reply by Beamer, almost 9 years ago:
Thankyou @Super_Hippo, that makes perfect sense.
How to call this method
By jacquelinereilly, with 11 replies.
Last reply by jacquelinereilly, almost 9 years ago:
Thank you!
TankWars Questions
By abot1776, with 4 replies.
Last reply by Super_Hippo, almost 9 years ago:
When I run the scenario, both tanks kill themselves when shooting, so I don't know why you said the tanks acted differently. With touching I mean something like: <Code Omitted>
jtab- first, next,previous last button
By divinity, with 4 replies.
Last reply by danpost, almost 9 years ago:
divinity wrote...
line 1 error, what does that mean
I do not see where 'conn' is being set any object to it (its value remains 'null', which you cannot execute any method on -- hence the error).
How do I make enemies not spawn within a given range of my main character
By Brantgarron, with 17 replies.
Last reply by Brantgarron, almost 9 years ago:
Thanks for all the help....I got it to work after switching some of my world class around and incorporating the code you provided.
db error to login in electronic role
By divinity, with 4 replies.
Last reply by divinity, almost 9 years ago:
hey danpost I have since fixed that problems already but thanks all the same
Ships must take three hits before exploding
By massivassl, with 4 replies.
Last reply by massivassl, almost 9 years ago:
Ah I see. Thanks a lot, dan and hippo.
Using the Enter key to re-set World
By elbebe20, with 3 replies.
Last reply by danpost, almost 9 years ago:
elbebe20 wrote...
But, this code wont reset my world whenever I click the enter key on the keyboard....???? I deleted my original code and simply copy yours in my CrabWorld as suggested, but it is not working? any idea.
Please show what you tried (show the code for the CrabWorld class with what you attempted that failed).
Shooting at regular intervals
By massivassl, with 4 replies.
Last reply by massivassl, almost 9 years ago:
thanks a bunch
Image Switch frequency
By Pjagadish, with 2 replies.
Last reply by Pjagadish, almost 9 years ago:
That's pretty cool. Thanks!
Stopping music
By SuperNinja, with 5 replies.
Last reply by SuperNinja, almost 9 years ago:
Thank you so much! Worked beautifully. P.S. Super appreciative for all the help you've given me and everyone else on this site
ArrayList Help
By doglover555, with 5 replies.
Last reply by danpost, almost 9 years ago:
Okay -- your lists will never contain the same things. The reason being is that you create and add items to one list (in the PackingList class), then, you acquire the other list by using 'getIntersectingObjects' (in the Mannequin class). These lists may contain similar type items, but they will not be the same items (a Tank actor in one list is not the same Tank actor in the other list). Probably best is to create one of each item to start with. Save a reference to each and add a getter method for each. Then the world can get and add each into itself and the PackingList class can add thei
How do I get an actor to slow down when it hits another actor?
By rory, with 1 reply.
Replied to by danpost, almost 9 years ago:
You cannot change a hard-coded value (which you currently are using for the speed of the sheep). The value for the speed (currently '2' everywhere for the sheep) needs to be replaced by a variable (a value that can be changed). That variable needs to be maintained by using a field. You will also need a timer field to track the time remaining that the sheep is to run at slow speed.
Making my first game!
By agray11202, with 2 replies.
Last reply by danpost, almost 9 years ago:
agray11202 wrote...
How do I make the actors in my class randomly pop up?
Let your world control that through its act method.
Is it possible for one actor to call another actor to appear in the game?
If you mean create another actor and add it into the world -- no problem: <Code Omitted>
Is it possible to put all of the ingredients I have touched into an if/then statement? (like if one actor has touched a specific amount of other actors do..., else...)
It is possible to track whi
309
310
311
312
313
314
315
X