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
setting a timer for my game
By rory, with 1 reply.
Replied to by danpost, about 8 years ago:
rory wrote...
I want to set my game to have a 2-minute timer (displayed on the screen) and after the timer ends the game stops. I have no clue how to program this. help.
My
Value Display Tutorial
shows how to create a displayable timer.
trying to access a counter from MyWorld in Actor class
By ryan22, with 4 replies.
Last reply by danpost, about 8 years ago:
ryan22 wrote...
The Minus and Plus Ten are just object in the game where if you hit one, you lose or gain points based on it.
I understood that. I was just wondering why you would create one for no reason at line 7 above.
background music
By doglover555, with 3 replies.
Last reply by Super_Hippo, about 8 years ago:
Does the file have the same name? Maybe it is 'Intro' and not 'Into"? I am not sure how it works in Mac, but you could try to use a file name without a space.
Help. Is there a reverse?
By RB3454, with 1 reply.
Replied to by Super_Hippo, about 8 years ago:
When the scenario is stopped, no code can reactivate it again because no code is executed (after the current act is finished). You can pause the whole scenario using the Greenfoot.delay method.
Interactions between two classes
By MarioLuigi, with 10 replies.
Last reply by MarioLuigi, about 8 years ago:
Thank you very much!!!
List of Method in Greenfoot Class ?
By donysamdhila, with 5 replies.
Last reply by donysamdhila, about 8 years ago:
Thanks Dan.
Lag
By MaxBest, with 4 replies.
Last reply by MaxBest, about 8 years ago:
danpost wrote...
Probably best is to upload the project with source so someone can run and check it out themselves.
Thank you for your help but I have worked it out now, I accidentally had an infinite loop spawning a GUI in the same place so I couldn't tell it was spawning more than once but was causing loads of lag.
how to scroll?
By kevoncmlc2000, with 9 replies.
Last reply by danpost, about 8 years ago:
kevoncmlc2000 wrote...
ill try it. thanks
Keep in mind that actors leaving the viewable world which are no longer needed should be removed from the world to prevent possible lag.
help
By _The_Black_Swordsman_, with 3 replies.
Last reply by danpost, about 8 years ago:
_The_Black_Swordsman_ wrote...
whats a field?
Line 1 is a field declaration line -- a variable that is declared within a class, but not within a method or constructor (which are just plain variables). Each object created from the class comes with a placeholder for, in this case, an 'int' value called 'rotation' given an initial value of '0'. As 'private', no other class has direct access to the field. The field will exist as long as the object it belongs to exists. A field can be of any of the primary types (int, double, float, boolean, etc.) or it can reference an object of the s
Problem with java.awt.Color and java.awt.Font
By ryan22, with 1 reply.
Replied to by danpost, about 8 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, about 8 years ago:
Thankyou @Super_Hippo, that makes perfect sense.
How to call this method
By jacquelinereilly, with 11 replies.
Last reply by jacquelinereilly, about 8 years ago:
Thank you!
TankWars Questions
By abot1776, with 4 replies.
Last reply by Super_Hippo, about 8 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, about 8 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, about 8 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.
307
308
309
310
311
312
313
X