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
Challenge 5 || August 2013
By joeschmoe, with 34 replies.
Last reply by JetLennit, about 11 years ago:
wikipedia
Bouncing Balls help
By stef, with 2 replies.
Last reply by stef, about 11 years ago:
Thanks! I'll give it a try.
Timer
By RedFox92, with 1 reply.
Replied to by sametguzelgun, about 11 years ago:
<Code Omitted>like? Note: Edited.
Help
By RedFox92, with 4 replies.
Last reply by RedFox92, about 11 years ago:
Thanx that help i did it a little different heres the code
How to fire a command line from greenfoot
By plsurveyor, with no replies.
I am writing a Java learning tool in Greenfoot. It's already working and I have this code. <Code Omitted> to be called by these lines <Code Omitted> Now, what I want to be able to do is, after the javac command, I'll run "java sample" inside a terminal. I understand that going "cmd start java sample" only returns what is supposedly displayed on the cmd to the Greenfoot terminal. And by going "cmd start" ill just invoke a new cmd on the dir where my greenfoot project is at. (Since the target of our project is to teach Java to kids, I think it would be better if we need not include a documentation on how to manually run java on the console.) I am on windows 7. If anyone can point me to the right track or maybe give me a hint as to how ill be able to start my cmd already with java filename.. Please and Thank you
Worms reappear??
By Jackermann, with 3 replies.
Last reply by Gevater_Tod4711, about 11 years ago:
You already have the code to add the worms at random places. To give them a chance to be readded of about 30% you can use <Code Omitted> But I don't realy get what you mean by random timing. Do you want the respawned worm to appear after some time? Or do you want worms to appear randomly no matter whether they're eaten? However, you can use the code like this:
Help with spawning???
By Dethace, with 6 replies.
Last reply by Dethace, about 11 years ago:
I kept putting INT before hand, and that's why teh code wasn't working Thank you!
Greenfoot Let's Plays
By SPower, with 39 replies.
Last reply by Kartoffelbrot, about 11 years ago:
Has anyone an idea how we can advertise, so that more people will watch the Let's Plays and not only us?
bootstrap class path not set in conjunction with -source 1.6
By Upupzealot, with 19 replies.
Last reply by Upupzealot, about 11 years ago:
@davmac thanks a lot. @danpost I would try that next time, thank you.
need help
By manish123, with 1 reply.
Replied to by Gevater_Tod4711, about 11 years ago:
What exactly do you want this code to do? Until now you just start a for loop and create an image that is never shown. If you want to create a countdown timer you first should never use loops. The loop will count down in only one act and you game will end before it has begon. Then you should create the image you want using another GreenfootImage constructor and also print the image onto the world or somewhere else so that you can see the image. Try it like this:
Insert image in world
By savanibharat, with 7 replies.
Last reply by danpost, about 11 years ago:
The 'addObject' method has the signature 'addObject(Actor, int, int)', not 'addObject(String, int, int)'. You need to substitute 'Actor' with either 'new
ActorName
()' or get a reference to a new actor with 'Actor actor = new
ActorName
();' and then use 'addObject(actor, x, y);'. Of course, 'x' and 'y' need to refer to or be replaced with values.
Detecting an Image
By Y3llowMustang, with 3 replies.
Last reply by Gevater_Tod4711, about 11 years ago:
You can use the methods
getIntersectingObjects
or
getOneIntersectingObject
from the greenfoot API to detect whether your actor touches another actor. The method getIntersectingObjects will return a list of objects and getOneIntersectingObject will only return one object. You can use this methods e.g. like this:
The current code im using for my character,how do i add lives?
By CreepingFuRbalL, with 3 replies.
Last reply by Gevater_Tod4711, about 11 years ago:
To add the variable you can use this code: <Code Omitted> To make your actor loose a live when it hits another actor is easy. Try it like this: <Code Omitted> The only problem is that after you lost a live the actor will still be there and your actor will get hurt again. Do you want to remove the other actor after it has hit you
Need help with adding a spawn point to the world
By CreepingFuRbalL, with 1 reply.
Replied to by Gevater_Tod4711, about 11 years ago:
The easyest way to add a spawn point would be to add new objects to the world when a condition is fullfiled: <Code Omitted> This will make new objects spawn when there are less than it should be.
Also how to add health or lives onto the game
By CreepingFuRbalL, with no replies.
Hi id also like to add health/or lives in my game so that if one life goes my actor can respawn with 2 other attempts
791
792
793
794
795
796
797
X