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
Help with error message
By Pinkfle, with 2 replies.
Last reply by Pinkfle, over 9 years ago:
Thank you VERY much!!!
movement and world edge
By jaycee1021, with 3 replies.
Last reply by danpost, over 9 years ago:
Use a combination 'if' statement; use both the direction and position in determining whether to change directions or not (for both sides). Something like this: <Code Omitted>
Performance problems while playing sound.
By elroxar, with 2 replies.
Last reply by elroxar, over 9 years ago:
Super_Hippo wrote...
Any chance you are creating multiple Intro objects?
Could be. I will have a look. Thanks a lot.
Need help with counting objects
By TheMemeMachine, with 10 replies.
Last reply by Nosson1459, over 9 years ago:
TheMemeMachine wrote...
Does that mean that I am supposed to write your code in the world sublass act() method or where if not there?
If you write that code in the act method then the lives will be decreased once every act cycle which means that after a few seconds the lives will be -500. That code you put in the place that you want the lives to be decreased (same as where you put the code for re-setLocation of the fly).
How to send an actor to another actor
By DPK, with 27 replies.
Last reply by Nosson1459, over 9 years ago:
Waiting to see it uploaded... .
How can I create new instances of an object?
By NussNinja, with 1 reply.
Replied to by Nosson1459, over 9 years ago:
When you want to add this trace from Ant you could do: <Code Omitted>.
Help laser spaceship
By emma123, with 1 reply.
Replied to by Nosson1459, over 9 years ago:
Make a new Actor to be the laser and whenever the correct button is pressed for shooting add a new Laser (to move in the same direction that you're facing).
isTouching detecting Transparency problem
By Brandawg, with 9 replies.
Last reply by Nosson1459, over 9 years ago:
danpost wrote...
How about just adding a transparent actor at the "hole" and if is touching it, fall. It should probably be a bit smaller than the hole itself to make allowance for the size of the actor falling through it.
That's an idea, or you can create your own isTouching method ( @author (Busch2207 (Moritz L.)) ) which looks for pixels (line 49 makes sure NOT transparent) instead of the whole image:
each object has a own counter
By Telko, with 1 reply.
Replied to by danpost, over 9 years ago:
It is easier to deal with one actor with a changing image than with two actor, having one with a changing image, and needing to deal with interaction between the two. You can accomplish this by keeping a reference to an image without any text and an 'update' method to apply the text on the image to be shown:
Flappy Bird Score
By mitrolex, with 9 replies.
Last reply by mitrolex, over 9 years ago:
Thank's guys, it works like a charm now.
Does Greenfoot.mouseClicked() only work if the parameter is the object itself (this)?
By SallySanban, with 46 replies.
Last reply by SallySanban, over 9 years ago:
Thank you very much, @Super_Hippo and @danpost! I was able to fix the door clicking and the background switching the way I wanted it to work. :)
Remove Object Problem
By joshuadswa, with 10 replies.
Last reply by joshuadswa, over 9 years ago:
Ok thx a lot sir :) have a nice day :D
Stop world problem
By joshuadswa, with 13 replies.
Last reply by joshuadswa, over 9 years ago:
Thx a lot :D both of you are the best ^^
Many errors that need fixing.
By OKNEM, with 10 replies.
Last reply by OKNEM, over 9 years ago:
Awesome. All are fixed. Thanks!
setImage() not generating image, please help!
By Fibonacci, with 1 reply.
Replied to by Super_Hippo, over 9 years ago:
You are removing the object from the world and then set a new image to it. The object now has indeed this explosion.png image but you don't see the image because the object is no longer in the world.
This is the class of enemy car that the player has to avoid.
This seems to be a little bit misleading because it seems like this car is the one which you can control. I suggest you add a new actor to the world which displays the explosion. As an alternative (because the game ends after the first crash anyways), you can just remove the 'myWorld.removeObject(this);' line. Btw, yo
389
390
391
392
393
394
395
X