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
java.lang.IllegalStateException
By Proprogrammer04, with 8 replies.
Last reply by Proprogrammer04, over 7 years ago:
danpost wrote...
Add (insert) the following at line 66: <Code Omitted>See if that helps.
That helped, the program doesn't stops itself anymore. It don't want to do what I want it does, but I think I can manage it myself ;-) (p.s. Nccb your idea shouldn't matter in my case beacause situationRemove() shouldn't be executed…)
Memory game help with spawning please
By N0way, with 2 replies.
Last reply by nccb, over 7 years ago:
When you remove the apple from the world, you reset appleflip. Similarly, when you remove the letter, you reset letterAflip. So whichever one gets removed first will prevent the other seeing the state where both are flipped. You should probably make one class responsible for removing both the items rather than making them only remove themselves. (Greenfoot.delay delays the whole simulation not just that actor, so it won't make a difference to the behaviour.)
If else statement problem
By NoobFected, with 1 reply.
Replied to by danpost, over 7 years ago:
I think you are using
turn
in places where you should be using
setRotation
(line 57 and 81). You are turning -90 degrees (making a left face) when hitting a side edge along the bottom. That will make the actor face in opposite directions (one up and one down) depending on the side hit.
Rugged Movement
By AdiBak, with 6 replies.
Last reply by AdiBak, over 7 years ago:
Hi, When I tried to publish this scenario, it took around 20-30 minutes for the publishing bar to become full, then it responded with a 500 error. Can someone please help? Thank you.
Delay
By Philipplol, with 19 replies.
Last reply by Super_Hippo, over 7 years ago:
So you want your enemy to move in one random direction every three act cycles? I just changed that to 30, so about two steps per second.
Explotions
By Supersoprych, with 4 replies.
Last reply by Supersoprych, over 7 years ago:
heres the Image if you want it [Disallowed URL]
Issues with respawning
By ErasedBlade, with 4 replies.
Last reply by N0way, over 7 years ago:
on line 6th should be or instead of and(&&) is it? that may be a problem
Help with isTouching() method
By AwesomeKid, with 2 replies.
Last reply by N0way, over 7 years ago:
change line 116 if(getOneIntersectingObject(Lava.class) != null) {
Help with Image and Displaying Text
By CROCKETTROCKETT4, with 1 reply.
Replied to by Super_Hippo, over 7 years ago:
The "Image" method lacks a return type. If it should be the constructor, its name has to be equal to the class' name. Your "GreenfootImage" method has a return type String, but it does not return anything. In fact, the method doesn't do anything. I think it would be clever to let the word methods return one word and not the whole array of words. Then you also don't need to call the methods twice. The "word" method also has a return type String, but doesn't return anything. Keep in mind that the text on an image is not updated when you change the text variable. You need to create a new imag
Open editor description prompt thing
By Olympuss, with 1 reply.
Replied to by Olympuss, over 7 years ago:
Never mind I figured out it was because I opened stride, not Java.
My counter is counting up. But I need it to count the leaves my wombat eats.
By Rawlfish, with 8 replies.
Last reply by danpost, over 7 years ago:
Rawlfish wrote...
Everything was going smooth until I compiled it and for return numOfLeaves; in line 91. It said cannot find symbol - Variable numOfLeaves
True, there is no
numOfLeaves
variable. You could change
numOfLeaves
to
counter.getValue()
.
Scaling the object's height not working
By NoobFected, with 2 replies.
Last reply by NoobFected, over 7 years ago:
thank you
Actor not in world error
By NoobFected, with 4 replies.
Last reply by NoobFected, over 7 years ago:
danpost wrote...
NoobFected wrote...
Is there like a way to fix this though? I still want to keep the setLocation method.
Insert the following immediately before the
setLocation
line: <Code Omitted>
Thanks, it works perfectly now.
Making a shooting laser
By NoobFected, with 10 replies.
Last reply by NoobFected, over 7 years ago:
Thank you!
Animal Sound Board game
By OgresHaveLayers, with 1 reply.
Replied to by danpost, over 7 years ago:
OgresHaveLayers wrote...
need help specifically for playing a sound then pausing for 1 second then playing the next sound and repeating this another 8 times. I also need help with tallying up the points when you click the correct animal.
You can list the sounds, or name of the sounds (which will still require a
GreenfootSound
field for the currently playing sound) in an array and add an int field to track which one is playing (index pointer for array), plus another int field to run the delay timer. That way, either a sound is playing or the timer is running. If timer is runnin
196
197
198
199
200
201
202
X