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
I need help!
By jmdreyer, with 4 replies.
Last reply by danpost, about 10 years ago:
Try changing lines 29 and 35 to this: <Code Omitted>
Help request: Trying to get two objects to move at the same time using 1 control.
By BingoWasHisNamo, with 5 replies.
Last reply by BingoWasHisNamo, about 10 years ago:
Alright, thank you for the help, I'm testing it out right now, but I'm pretty sure it should fix the problem.
Damage depends on image, and contact.
By kdbailey, with no replies.
I have a game that makes enemies randomly spawn from the sides of the screen, and chase a knight. I've tried animating sword swings but this is a project with limited time, and I don't have the time to make these. I do have images facing each way (left, right, down, up) and since I don't have enough time to animate swinging the sword, I need it to be that when coming in contact with the image that faces the enemy, it doesn't do damage to the knight. I'm confused on where to start mainly, and any help would be appreciated. (This is a project, so any help will be cited with full credit given where due)
Problem with a cheat
By jmdreyer, with 1 reply.
Replied to by Zamoht, about 10 years ago:
Make objects appear at the edge or change the code so that your marble can't move completely to the edge.
Timer
By jmdreyer, with 5 replies.
Last reply by jmdreyer, about 10 years ago:
thank you guys for your help
Need a loop for my project
By zworrub, with 1 reply.
Replied to by danpost, about 10 years ago:
A basic field timer would be like this: <Code Omitted>The 'max timer value will normally be a number about 50 or 60 times the number of seconds to delay between executions of the code.
Problems with changing worlds.
By DennisDvD, with 6 replies.
Last reply by DennisDvD, about 10 years ago:
Thanks Dan, always a saviour
Help With saving scoreS
By CooliMC, with 6 replies.
Last reply by CooliMC, about 10 years ago:
ok thx for your help
Help
By bizzard, with 5 replies.
Last reply by danpost, about 10 years ago:
bizzard wrote...
nevermind i fix the problem.
Why don't you show what you ended up with, so others who run into the same sort of problem may know what to do? or, so that someone may suggest to you a better way?
Loop rotation
By Bntyhntr501, with 2 replies.
Last reply by Bntyhntr501, about 10 years ago:
Oh wow, had no idea it was that simple thank you danpost.
Need Help on Color Sensing (New to Greenfoot)
By Speker3, with 1 reply.
Replied to by danpost, about 10 years ago:
The method you have shown does not make any sense. The 'if' block conditional has two flaws. The first is in your comparison: you should compare colors like this -- 'Color.WHITE.equals(image.getColorAt(16, 18))'. The other is, unless the image of your actor itself changes, the color 'image.getColorAt(16, 18)' will always be the same; which makes the 'if' clause pointless. If this method is in the class of the bullet (which it appears to be), then 'getImage' will get the image of the bullet, which is not, I believe, the image you want to check the color of. To get the image of the backgro
What is wrong with this code (probably a lot)
By iSuckAtGreenfoot, with 3 replies.
Last reply by danpost, about 10 years ago:
Two things: (1) there is no act method within the class, so no action will be taken; (2) the method called by 'intersects()' on line 106 in nowhere to be found and the method 'intersects(Actor)' called at line 104 will overshadow the 'intersects(Actor' method of the Actor class; you may want to use 'isTouching(Class)' instead to determine if it is eating time.
final game project
By jlin55, with 1 reply.
Replied to by lordhershey, about 10 years ago:
I found 3 scenarios with source they might be useful, of course you will have to ask these people to use their code and or project assets.
http://www.greenfoot.org/scenarios/674
http://www.greenfoot.org/scenarios/675
http://www.greenfoot.org/scenarios/7441
Suche Fehler!
By Asoraso, with 4 replies.
Last reply by danpost, about 10 years ago:
danpost wrote...
How can every line in the code given be so right and this one line be so wrong
Ok. I missed that one; so, not every line.
Help with lag!
By Daringa, with 2 replies.
Last reply by danpost, about 10 years ago:
lordhershey wrote...
It looks like your Object class here may be switching your worlds at every act call.
I do not see that as the 'nextLevel' and 'nextLevel2' place conditions on changing worlds within them. You are correct in mentioning the name of the class. Object should probably never be used as a class name, as all classes are already subclasses of the Object class (except the Object class itself). I do not get grabbing the background image every act cycle. This may be the main cause of the lag.
678
679
680
681
682
683
684
X