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
Broken code
By Ticker175, with 4 replies.
Last reply by Ticker175, about 8 years ago:
thanks i realised what your saying and when i inverted the up and down cordenets (from - to + and visa versa) and it worked!!! Thanks Thomas
Lightbot
By anelio21, with 1 reply.
Replied to by danpost, about 8 years ago:
anelio21 wrote...
hello guys :) how can i create a game like lightbot?? please help
What ideas do you have about how (what have you tried)?
Can't add onscreen message
By idk1234, with 8 replies.
Last reply by danpost, about 8 years ago:
idk1234 wrote...
It works without a timer, but it spawns an infinite about of Yellow_Crushed. So I commented that I would like it fixed and with a Timer, and so I tried to follow Danpost's code, but as I said it does not appear currently.
Try this for the Yellow_Crushed class: <Code Omitted>and this for the display2 method:
Re: Unable to loop/Restart Code
By idk1234, with 4 replies.
Last reply by danpost, about 8 years ago:
You have the following line near the top of the class code: <Code Omitted>You can give it an initial value -- maybe something like: <Code Omitted>
Greenfoot Freezing after a few seconds.
By strange_Robotics, with 1 reply.
Replied to by danpost, about 8 years ago:
strange_Robotics wrote...
Please point out if I did something wrong. << Code Omitted >>
I do not see anything that would cause the scenario to "freeze" as you suggest. I do, however see something that could (potentially) cause a lagging issue (if you happen to have lots of little CPU time-wasting code as shown here). You are creating your images every act cycle (see animateShot method). You can create them once when you declare the fields, replacing line 15 with:
Greenfoot lagging then screen turning white
By Ryan478, with 2 replies.
Last reply by Ryan478, about 8 years ago:
thanks
how to change worlds between levels
By liverpoolfc, with 7 replies.
Last reply by Super_Hippo, about 8 years ago:
You could add a 'Greenfoot.delay(600);' between lines 3 and 4 if you want to delay the whole scenario. If not, you need to set a timer and let it run for those 10 seconds and set the new world when it reached 0.
how to put timer in a game in greenfoot version 2.4.2
By liverpoolfc, with 12 replies.
Last reply by Super_Hippo, about 8 years ago:
liverpoolfc wrote...
When I wrote private int countdown = 3600; , it showed illegal start of an expression.
It should be at the top of the class outside any methods.
Can't Switch Levels
By jjboy, with 1 reply.
Replied to by Super_Hippo, about 8 years ago:
When you call the 'makeLevel' method from the constructor of the 'Space' class, score will always be 0.
scrolling world
By mole2003, with 1 reply.
Replied to by danpost, about 8 years ago:
mole2003 wrote...
I am trying to make the t rex game from google chrome. I cannot make the background (which is a rectangular sprite) to seemingly move for infinity. The randomly spawned obstacles should also move with the background as well
Please refer to my
Scrolling Tutorial
scenario.
Can't Switch Levels
By jjboy, with 3 replies.
Last reply by danpost, about 8 years ago:
jjboy wrote...
oh, I didn't even see that, thanks for your help!
I do not suspect that
addScore
would be called from any of the classes given. At any rate, there is a more general issue here in that once you leave the
Space
world, the
counter
object it created goes with it. However, I do not see a need for a counter that causes a world change upon each increment of its value -- that is, you can just change worlds (it should be obvious which world to proceed to determined by which world is currently active).
Having issues with winning the game
By jjboy, with 1 reply.
Replied to by danpost, about 8 years ago:
To test for equality, use the conditional operator '=='. Line 22 above should be <Code Omitted>I said
supposedly
because I do not see where a
win
field is declared within the class.
Having issues with setImage()
By GaijinVagabond, with 2 replies.
Last reply by GaijinVagabond, about 8 years ago:
thanks that works great
Broken code
By Ticker175, with no replies.
hey guys im having trouble with my code for my pacman game can anyone see whats causeing the problem of the check methods. <Code Omitted>
Can't Add Scoring
By jjboy, with 2 replies.
Last reply by jjboy, about 8 years ago:
thank you so much, now it works!!
245
246
247
248
249
250
251
X