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
Help. I Need to make than an actor walk between 3 points.
By DamaRoja, with 3 replies.
Last reply by danpost, about 11 years ago:
DamaRoja wrote...
it's frustranting than my actor move inmediately from point a (for example) to point b.
That is what using the 'setLocation' method does -- places your actor at the location coordinates given. So, if you give it the coordinates of the location of where the mouse was clicked, that is where it will be immediately placed.
And moreover, I wanted that my actor move between points set in the program.
I am a bit confused. You cannot have it move to both mouse click locations and to pre-assigned points. Maybe you can elaborate as to exactly what you want t
Memory Heap Error when making a gif background?
By VinhVan, with 2 replies.
Last reply by VinhVan, about 11 years ago:
Word. Thank you
Problems with trig functions
By Vellyxenya, with 5 replies.
Last reply by davmac, about 11 years ago:
Vellyxenya wrote...
Yea in the meantime, i've found another way of doing it: by using turnTowards and making them move backward...
You could also use turnTowards followed by turn(180), and then move forwards :)
Need help with clara pacman (Dont go direction you came in)
By Zues, with 1 reply.
Replied to by danpost, about 11 years ago:
Please show the code for the 'getDirection' method. If all it does is determine the direction and does not actually change anything, then I cannot see how it would have any influence on what the 'optionsOfDirection' method is doing. Also, lines 4 though 15, which is the final code in the method, will randomly choose any of the possible directions, regardless of which direction it was previously facing.
BrickBreaker Ball Help
By ali_23, with 9 replies.
Last reply by danpost, about 11 years ago:
You should trace the logic of your 'checkWalls' method. You cannot just throw the code given you into the method. The snippets given you should be placed at the proper locations, replacing the problem code you already had. Also, using 'isAtEdge' will not be enough to determine which edge is being hit -- even with the rotational value). You need to check the actual x- and y-coordinate values for it being at an edge.
addObject/removeObject/isAtEdge...
By Vellyxenya, with 2 replies.
Last reply by Vellyxenya, about 11 years ago:
Thank you very much, it works perfectly ! :)
How to use the act()?
By Stalfoes, with 4 replies.
Last reply by Stalfoes, about 11 years ago:
Thank you so much for your help (and patience)!
Help me please to solve my program
By noob_tux, with 4 replies.
Last reply by noob_tux, about 11 years ago:
danpost wrote...
noob_tux wrote...
Thank you. Now I have problem with collision bullet with walls. Would you help me ?
Explain and show related code.
So lucky, I solve my code for collision. thank you very much for always reply my post :)
Removing all Subclasses of an Actor from another Actor When Touching
By davis25811, with 2 replies.
Last reply by davmac, about 11 years ago:
The code you have will (or at least should) remove any touching instance of Bone including instances of its subclasses (RedBone etc). Perhaps post more of your code (or even upload your scenario) so we can see where this has gone wrong.
Chain Factory, greenfoot
By sophievangemert, with 1 reply.
Replied to by Super_Hippo, about 11 years ago:
Replace lines 18 and 19 with this: <Code Omitted>
Displaying values in an arraylist from a txt file
By someone1, with 3 replies.
Last reply by duckbread, about 11 years ago:
Try this:
Bombs
By Zinks2, with 11 replies.
Last reply by Bubbless, about 11 years ago:
nope
Good logic, bad syntax...
By Pr0grammer, with 1 reply.
Replied to by danpost, about 11 years ago:
The code in the Spawner class act method looks like a good candidate for using the
switch statement
.
Separating float values in a txt file to find the avg
By someone1, with 3 replies.
Last reply by danpost, about 11 years ago:
someone1 wrote...
Could you show me an example of this plz
If 'line' was one entry in the file that was read back in, then the following would convert the height and weight back into floats: <Code Omitted>
Multiple Worlds
By Collin, with 3 replies.
Last reply by Super_Hippo, about 11 years ago:
Start the first level as described. Don't start the other levels like that. Implement code to get to the next world: <Code Omitted>
539
540
541
542
543
544
545
X