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
How do I make an object turn towards another object?
By steved, with 9 replies.
Last reply by steved, almost 13 years ago:
@davmac, thanks I finally got it working! @danpost, no problem and thanks for all the help and for the random thing. @tylers, I tried that and it doesn't seem to work ill mess with it and see if I can figure that out. It sure would be simpler.
Scrolling with 2 lists, one works, other doesnt.
By matt.milan, with 3 replies.
Last reply by danpost, almost 13 years ago:
I added a 'bigRefresh();' as the first statement in the scroll() method, and it seemed to work OK.
Changing specific colors in an image
By tallkid10, with 2 replies.
Last reply by tallkid10, almost 13 years ago:
Wow thanks for such a quick response. I had the x and y starting at 15 from inspecting the arrays earlier, forgot to change'm when I pasted the code here. I didn't know about the getRed/blue/green() methods, I was just trying to inspect using greenfoot (which didn't tell me much). I'm guessing they are part of the Color class? Never thought to check that. I found out that the template color wasn't entered in correctly. I changed one number and it all worked! Thanks a bunch.
Moving Platform
By dark_sky, with 5 replies.
Last reply by danpost, almost 13 years ago:
You could add an instance variable to the Platform class to hold a reference to the player on the platform (or null, if none). <Code Omitted>Then, when you move the platform, check for 'player' not being 'null', and if not, also move the player the same amount. If the player moves or jumps off the platform, set the platform 'playerOn' variable back to 'null'. It might be wise to have an instance variable 'onPlatform' to hold a reference to the platform the player landed on. ** On th
Arranging Actors
By Matt, with 1 reply.
Replied to by danpost, almost 13 years ago:
Use the setPaintOrder method. Check it out in the Greenfoot API, in the World class. That will at least help straighten out the different classes; however, will not help with actors of the same class. To make them show over others of the same class, save its location, remove it, and add it back into the world. <Code Omitted>
Changing speed of an actor :)
By Matt, with 2 replies.
Last reply by danpost, almost 13 years ago:
Your setDirection() code can be reduced to: <Code Omitted>
Greenfoot, Animation
By Matt, with 5 replies.
Last reply by Matt, almost 13 years ago:
THANKS! everything works exactly how I wanted it to
Score per second help please!
By horyna, with 9 replies.
Last reply by SPower, almost 13 years ago:
You're welcome :)
Ending a game
By Matt, with 1 reply.
Replied to by SPower, almost 13 years ago:
Sure: <Code Omitted>Do this in act(). Replace theXCoordinate and theYCoordinate by numbers, which are the coordinates of the location you want to hit.
static images - multiple tile sets
By matt.milan, with 5 replies.
Last reply by davmac, almost 13 years ago:
Just to explain something else you may have missed, line 18 from your original post: GreenfootImage expandedImages = imgs; ... doesn't make a copy of the array, it just creates another reference to it. So the following lines: imgs = expandedImages; imgs = expandedImages; ... are either redundant (first line above) or modify the original array (second line above).
Instance Variables
By Loopy, with 3 replies.
Last reply by Loopy, almost 13 years ago:
Thank you danpost. I was able to get my questions answered!
Is there something about getOneIntersectingObject() that I don't understand?
By darkmist255, with 3 replies.
Last reply by darkmist255, almost 13 years ago:
Wow... Thanks davmac, I can't believe I didn't notice that! That would explain the character sinking into the ground since he's taller than he is wide... Well I think from now on I'm not just going look for what might be wrong with how I'm doing it, I'll look for typos first :D!
How do I make a boolean?
By h123n, with 5 replies.
Last reply by h123n, almost 13 years ago:
thanks that helps
How to perform a task once and only once.
By Loopy, with 7 replies.
Last reply by trash1000, almost 13 years ago:
The exclamation mark translates to 'not'. Like in "if
not
dancing".
Problem calling methods of actors from other actors
By Scoter_man1, with 3 replies.
Last reply by Scoter_man1, almost 13 years ago:
Thanks! That's helping me with so much more than just that one issue.
974
975
976
977
978
979
980
X