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
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).
Int openCorner() method
By JasonZhu, with 2 replies.
Last reply by danpost, over 11 years ago:
How about this: <Code Omitted>
Terminal error
By Alexander, with no replies.
Code in Terminal: sudo /opt/local/bin/port install libusb-devel +universal Error: Requested variants "+universal" do not match original selection "". Please use the same variants again, perform 'port clean libusb-devel' or specify the force option (-f). To report a bug, follow the instructions in the guide: http://guide.macports.org/#project.tickets Error: Processing of port libusb-devel failed Does anyone else get this error for attempting to connect your Kinect to your Mac? Running Mac OS X 10.8.5
Have you seen this? Is this a concern?
By Alexander, with no replies.
"Warning: USB events thread - failed to set priority. This might cause loss of data…" This occurs when I ran the sample code from the OpenNI folder via the Terminal. The code does run and interacts with the Kinect. I'm running Mac OS X 10.8.5
Boolean Tic Tac Toe Method
By JasonZhu, with 2 replies.
Last reply by JasonZhu, over 11 years ago:
Wow, that saves so much more room, thanks.
686
687
688
689
690
691
692
X