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
How to get a character to move with another moving platform
By sinlessclown, with 20 replies.
Last reply by danpost, over 9 years ago:
Yehuda wrote...
@danpost Why do you need the '- 1' on line 14? (You seem to have a lot of trailing spaces on your lines of code.)
I copied and modified the previous code given (as far as trailing spaces are concerned). The '-1' is not absolutely necessary, but will prevent the last column of pixels in the image of the player from being off the right edge of the world.
Starter
By GarudaStreak, with 1 reply.
Replied to by Yehuda, over 9 years ago:
I don't understand what you mean? What's the
first time
you open it? I would guess that the first time you open it, is when you click on the project.greenfoot file in your program directory, but then what's the second time?
Else is directly called even though if argument is true
By alfonsc, with 9 replies.
Last reply by alfonsc, over 9 years ago:
Yeah I know. I just realised that. Thanks for your help!
Adding actor at random method problem
By vermox, with 2 replies.
Last reply by vermox, over 9 years ago:
Thanks very much! Works perfectly now.
Reseting the world using an actor
By AustinProkopishin, with 28 replies.
Last reply by AustinProkopishin, over 9 years ago:
I uploaded my finished project here: http://www.greenfoot.org/scenarios/19215 if you are interested in checking it out. Thanks a lot for all the help!
How do upload a scenario to greenfoot.org?
By AustinProkopishin, with 1 reply.
Replied to by AustinProkopishin, over 9 years ago:
nevermind I figured it out
Multiple Actors Added
By itslit, with 5 replies.
Last reply by Yehuda, over 9 years ago:
With your last if's your assigning ('=') timer to 0 and counter which is an instance of Counter to 0 (instead of '=='), so that won't work. You have to use 1 instance of counter for that whole level (or game), not create a new one every act cycle. Then, if the level is over and the score value of that counter is 0 then it's game over.
Simple question about sharing variables between classes
By AustinProkopishin, with 3 replies.
Last reply by Yehuda, over 9 years ago:
It doesn't have to be in the world for you to access the variable. It may seem so from what I've shown above.
Making a pong game, need to increase ball speed on bounce.
By VinRio, with 9 replies.
Last reply by danpost, over 9 years ago:
VinRio wrote...
How would I make the ball start by heading straight towards a random paddle and then gain an angle based on hitting a wall or paddle. I have seen it done where the paddle has to be moving and it can put velocity onto the ball, but I can not seem to replicate anything like that.
It would be quite difficult to replicate that behavior when using 'setLocation', 'xSpeed' and 'ySpeed'. It would be much easier using 'turn' and 'move' commands. Also, tracking the speed and location coordinates in a more accurate manner would go a long way to improving the movement. That is, i
Write Multiple Things To A File
By mitrolex, with 91 replies.
Last reply by Super_Hippo, over 9 years ago:
mitrolex wrote...
It's moving the actor that i click on and not the strings that get written on the screen.
Right, didn't see that. Try using 'rlp.setLocation(...' Or just like danpost suggested, just always have the same size and let the rest be transparent.
How to stop my player from being able to jump continuously- platformer
By sinlessclown, with 1 reply.
Replied to by danpost, over 9 years ago:
You only want to jump when the player is on the ground. Place that condition on the ability to jump.
Steering a car
By vermox, with 1 reply.
Replied to by danpost, over 9 years ago:
vermox wrote...
I want to drive a car around the screen but I can't get the car to only move in the direction that the front is facing.
Remove lines 3, 9, 15, and 19. Then switch '3' and '-3' on lines 16 and 20.
Maps and Interpreters
By rockon411, with 4 replies.
Last reply by rockon411, over 9 years ago:
Thank you!
Very basic car driving smoothly question
By vermox, with 2 replies.
Last reply by Super_Hippo, over 9 years ago:
Did you change the execution speed of the scenario?
Adding a new enemy when the counter reaches a certain number
By nanakh, with 7 replies.
Last reply by nanakh, over 9 years ago:
nevermind Nosson1459's solution worked perfectly and because my approach on adding a point when the meteor hits the left edge doesnt work ill try yours and come back with some results thank you all for your replies
364
365
366
367
368
369
370
X