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
Scrolling ground help?
By zombiedude789, with 1 reply.
Replied to by danpost, over 11 years ago:
If you mean, "Do I implement the ground class scrolling with my background scrolling, then certainly. As the background moves, move all the Ground object the same amount. If 'scrollAmt' was the number of pixels to scroll by each act method, then: <Code Omitted>You will have to add new ground into the world on the one side and remove it from the world on the other. It is best to use an unbounded world.
Stopping an Object
By Gingervitis, with no replies.
I am making a maze game and I am having trouble getting my ball to stop and not go through the wall when it hits it. Here is my attempted code.<Code Omitted>
Tor Programieren HILFEEEEEEE
By SASCHA, with 4 replies.
Last reply by Gevater_Tod4711, over 11 years ago:
In line 63, 64 you are just checking whether the X component of the actors location is in a certain area. You also have to check the Y component. So after line 64 you should add some code like this: <Code Omitted> You will have to do the same after line 71. If you want your goal to get bigger you have to use a greater value than 100. For a smaler goal a smaler value.
Problem with a side
By JetLennit, with 2 replies.
Last reply by JetLennit, over 11 years ago:
Hadn't thought of directly making it a negative number with all the other ones........ but i can't believe i made that mistake!!!! Thank you sooo much
Set a counter for the points
By JesusJesus, with 2 replies.
Last reply by JesusJesus, over 11 years ago:
Thank you very much :D
How to use type boolean variable?
By new2programming, with 1 reply.
Replied to by davmac, over 11 years ago:
A boolean variable is just like any other variable (like an 'int' variable). Except whereas an int variable can hold a lot of different values - 0, 1, 2, 3, 1000, -1, etc - a boolean variable can only have two possible values, 'true' and 'false'. There's nothing magic about them otherwise - they work exactly as other variables do. Because the value of a boolean is already true or false, you don't need to compare them in 'if' statements, i.e. instead of writing: <Code Omitted> you can write: <Code Omitted>
I mean how
Setting the score through different worlds
By welleid, with 17 replies.
Last reply by welleid, over 11 years ago:
Thanks it works perfectly, I didn't think about setting the method in the subclass, meaning that we keep the same Score in fact.
Problem
By djEthen, with 2 replies.
Last reply by djEthen, over 11 years ago:
Ohk.. thanks will look into it.
problem using Greenfoot.mouseClicked(this)
By jainmanish, with 6 replies.
Last reply by jainmanish, over 11 years ago:
Greenfoot.mouseClicked(null) worked thank you very much @danpost
Scroll World trouble
By Draymothisk, with 1 reply.
Replied to by Draymothisk, over 11 years ago:
Never mind.. I fixed it.
Changing the uploaded size
By JetLennit, with 7 replies.
Last reply by FlyingRabidUnicornPig, over 11 years ago:
JetLennit wrote...
Oh... duh! *facepalm* i was just having problems in my browser!!! never mind
oh, well there you go
How to move on the y-axis
By OxiClean, with 6 replies.
Last reply by JetLennit, over 11 years ago:
Your welcome!
Hello Everyone Can you help Me???
By benjiedark, with 1 reply.
Replied to by davmac, over 11 years ago:
What's the codes to make the fish kill by another actor???
Please have a look at the tutorials (see the Documentation link) - check both the written tutorials and the "Joy of Code" videos.
and how it will end.
I guess it will end badly, for the fish. :(
non-repeating random number help
By ronzhi, with 26 replies.
Last reply by ronzhi, over 11 years ago:
Hi danpost,due to many things that i have to do i just fixed the question for certain number while still use your double array and JDialog loop but you've been really great help danpost thanks !
Stopping the scenario.....
By jennnnay24, with 20 replies.
Last reply by danpost, over 11 years ago:
isaunders7289 wrote...
How do you make the wombats face random directions when compiled in the world
First, simplify your 'setDirection' method to the following: <Code Omitted>Then, if you do not already have Wombat constructor in your code, add the following to the Wombat class: <Code Omitted>If you already had a Wombat constuctor, just append the 'setDi
852
853
854
855
856
857
858
X