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
Kinect
By Alexander, with 1 reply.
Replied to by BeYouself, over 11 years ago:
http://www.greenfoot.org/doc/kinect
Why does the snake start as 6 squares instead of as 1 square?
By Tommy99, with 7 replies.
Last reply by patrick26, over 11 years ago:
'
Get an actor to change color
By anonymousse, with 58 replies.
Last reply by danpost, over 11 years ago:
Please refer to the middle section,
The condtional operators
, of
this page
of the Java tutorials.
Companion?
By SullyFish, with 1 reply.
Replied to by lordhershey, over 11 years ago:
You could try something like have the bat turn towards the player, Use a countdown variable that gets set when you turn towards the character and each act method minus 1 from it, when it reaches zero turn towards the player and reset counter, this would be kind of like a gnat buzzing around your guy. Is that what you are looking for?
Questions about constructor
By getreides, with 4 replies.
Last reply by getreides, over 11 years ago:
Ah yes indeed, thank you so much for your help! I might get back once more after having tried some stuff:
How does one make an actor move when another actor comes in contact with it?
By Arichman, with 1 reply.
Replied to by danpost, over 11 years ago:
I think what you have will move the balls when the robots touch them. They are just not moving in the way you would like. I believe you want the ball to move in the same direction as the robot touching it is moving (or facing). For one example method: <Code Omitted>
Object being erased and re-added
By WhiteWolf13, with 3 replies.
Last reply by davmac, over 11 years ago:
If you remove the object from one world and add it into the second, as danpost describes, it will retain all its variable values.
AI and Intersections (pacman)
By dangwang, with 1 reply.
Replied to by davmac, over 11 years ago:
You need to introduce an instance variable which tracks whether the decision for the direction has been made yet. Only choose a new direction if it is false. You will need to clear it back to false once your Ghost moves past the intersection.
List help.
By Jonche, with 8 replies.
Last reply by danpost, over 11 years ago:
You also could have used: <Code Omitted>
Reset turn
By warner404, with 10 replies.
Last reply by danpost, over 11 years ago:
Alright, now, replace your act method with this: <Code Omitted>compile and run; this time click directly on the center of the back wheel and report back what are returned.
Can't edit
By dan11, with 2 replies.
Last reply by dan11, over 11 years ago:
Thanks, turns out the .java files were gone, only the .class files were there. I ran the .class files through a decompiler and put the .java files back in. It works now, although I have no clue what happened to it in the first place.
Snake game issue
By gamer121, with 14 replies.
Last reply by danpost, over 11 years ago:
Place a 'return;' statement after the 'Greenfoot.stop();' line in the atEdgeOfWorld 'if' block.
Calculate speed and angle of movement FROM x and y movement variables?
By Entity1037, with 15 replies.
Last reply by Entity1037, over 11 years ago:
OK. I wasn't sure. Well that makes making my new game engine much simpler! Thank you!
Exporting A Greenfoot Project with Native Libs
By Herlix, with 9 replies.
Last reply by Herlix, over 11 years ago:
Can Greenfoot read libs outside its own map? Like a map just beside the exported jar file? Ex: loader.addClasspath( "lib\\.\\com.jcraft.jsch.jar" ); ? that syntax is wrong ofc. My question would be what would the syntac look like? // Alex
Moving in different directions
By gamer121, with 1 reply.
Replied to by Zamoht, over 11 years ago:
You got it! setRotation( Greenfoot.getRandomNumber(4) * 90 ); should work perfectly for what you are trying to do. You should put that line in your constructor (put it somewhere in the "public Worm()" constructor).
685
686
687
688
689
690
691
X