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
Solid Wall
By Kevroa, with 3 replies.
Last reply by danpost, over 9 years ago:
Okay, first thing that needs done is to add variables to hold what movement was done. The character can move either way horizontally and vertically. So, a variable for change along the x-axis and a variable for change along the y-axis are needed. Your act method will now look like this: <Code Omitted>Now, that dx and dy are there,
Problem with isTouching
By Dirgantara007, with 1 reply.
Replied to by Super_Hippo, over 9 years ago:
Reason for the error: The actor is removed from the world and then you are calling a method which requires the actor to be in the world (in this case 'isTouching'). When the actor is removed from the world, the current act method will be finished. I don't really know why you need this code at all. You earlier check for the intersection with the Alien. If you want it to be removed, then remove it there. The 'toRemove' variable also seems to be useless.
how to move to next level
By ali18, with 6 replies.
Last reply by ali18, over 9 years ago:
Thank you very much. This is working very well now.
Condense code
By Trystar360, with 15 replies.
Last reply by Super_Hippo, over 9 years ago:
My map should have been this (forgot all the commas)... <Code Omitted> It's up to you if you prefer numbers or letters, it should do the same.
Bullet removal error
By Kevroa, with 3 replies.
Last reply by Kevroa, over 9 years ago:
Ah, Thanks! Makes sense... don't know why I didn't think of that. Will try in a few minutes...
Chess network
By aleR, with 3 replies.
Last reply by Yehuda, over 9 years ago:
Are you trying to have two Greenfoot users play against each other on the website? Maybe
this scenario
will help you.
Spawn an actor randomly after a period of time
By GreenfootNewbie2000, with 1 reply.
Replied to by danpost, over 9 years ago:
GreenfootNewbie2000 wrote...
What do I have to do to do this action every 5 seconds
Count act cycles. Usually 300 act cycles is about 5 seconds. You can simply what you show above to this: <Code Omitted>
Help
By Trystar360, with 4 replies.
Last reply by Trystar360, over 9 years ago:
That fixed it. Thank you!
I am super lost in my beginner Computer Science Class
By NickWood18, with 1 reply.
Replied to by danpost, over 9 years ago:
NickWood18 wrote...
hopefully the image link works.
You need to upload the image to an image hosting site or somewhere on the web to be accessible here. Better would be for you to explain what issues you are having and posting the relevant code directly here, however.
How to stop active threads when Reset is clicked?
By jld73, with no replies.
I'm currently running multiple threads alongside the main one, however, when you click the Reset button, only the main thread is restarted (thus clearing all references to other threads), and all of the other threads are left orphaned until greenfoot is closed. Does anyone know of a good way to detect when the scenario is being reset so I can interrupt the threads or a way for a thread to test if it has lost connection with the main thread to shut itself down?
question pixel game android
By dadansi, with no replies.
hallo all, i have question.. if you make game for android, how pixel size you are use??
Saving counter value over worlds... again.
By OKNEM, with 1 reply.
Replied to by danpost, over 9 years ago:
You could try out my new ScoreControl class; however, it looks like that would take a lot of work to change the class over. On the other hand, it is quite a hassle passing the value from world to world. The way my new class works, is that the control is static and holds one counter value. It also creates an actor to display the value if needed. The class is located in my Combo Support Class Demo scenario; but, I will show a more generic version of it here (to use GreenfootImage objects instead of TextImage objects):
Day Timer
By Randalini, with 1 reply.
Replied to by danpost, over 9 years ago:
All you need is one long type field and one int counter. The counter is incremented every 10 minutes and the other is to hold the time when the counter is to be incremented next:
football shooting
By Solimanma, with no replies.
I started building my own footbaill game but I can't shoot the Football at all all what I can do is to run with ball while it get's stuck to the Player's feet Please Help Me
Random movement made easy?
By ChessMaster123, with 4 replies.
Last reply by USER_NAME, over 9 years ago:
Ok, thanks
344
345
346
347
348
349
350
X