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
Shot damage
By mncomic, with 3 replies.
Last reply by erdelf, over 12 years ago:
tank
How do you generate objects in random spots until a game ends?
By abarnes, with 12 replies.
Last reply by abarnes, over 12 years ago:
Now I'm stuck on a scoreboard >.>
How do you make something happen when an actor is eaten?
By ScratchMan, with no replies.
For example, I would like more identical actors to be created when an actor is eaten by my main actor. Could anyone help?
Growing Game Code
By wafflepudding, with 7 replies.
Last reply by wafflepudding, over 12 years ago:
Put in the bracket, took that line out of the act, still doesn't work. Anything else I should try?
Chopping up an image
By actinium, with 4 replies.
Last reply by actinium, over 12 years ago:
Thanks all, that looks like what i need danpost. Thanks also zamoht.
Failure to change
By ader108, with no replies.
In my game, the zombie is supposed to eat the NPCs and then turn them into another zombie. This used to work.. until in attempts to condense I combined the two NPC classes and the four Zombie classes. Currently it simply removes the object and adjusts its image to the zombie relating to the object removed. <Code Omitted>
Removing all objects
By bbwf, with 21 replies.
Last reply by danpost, over 12 years ago:
'return;' is just a statement that causes an immediate exit from the method that is currently executing. Placing it in your code prevents later statements in the method from executing.
How to get the Greep/Alien to go back to the ship after they get the tomato?
By sask_girlz_rock, with no replies.
I have got the alien to get the tomato, bounce off the water and only a few return back to the ship. how can get it to return to the ship without the command saying return to ship?
How do you get the score to reset when you reset the game?
By theuberjew, with no replies.
me and my friend are stuck on this.
Whats the code for putting a timer in greenfoot if there is one?
By theuberjew, with 2 replies.
Last reply by theuberjew, over 12 years ago:
thanks figured it out
Light Cycle AI
By m.legere1323, with 5 replies.
Last reply by wafflepudding, over 12 years ago:
oh okay. thanks man I'll go there
Click to add objects
By super_noob, with 6 replies.
Last reply by Zamoht, over 12 years ago:
I guess you could add my code to the world's act() method like this. public void act() { if (Greenfoot.mouseClicked(null)) { MouseInfo mouseInfo = Greenfoot.getMouseInfo(); int x = mouseInfo.getX(); int y = mouseInfo.getY(); addObject(new WhatEverClass(), x, y); } }
Delaying An Actor
By marzukr, with 3 replies.
Last reply by marzukr, over 12 years ago:
Never mind I fixed this by decreasing jp to -16. Thanks.
adding a counter and making it work
By ctgreenfoot, with 1 reply.
Replied to by vonmeth, over 12 years ago:
Find the code in the Crab class (it should be in a method that looks for the worm) where the crab 'eats' the Worm class. You will want to assign a new value to your counter there. Something like, " counter = counter + 1; ", or you can simplify that line and use the increment operator - "counter++;" - that will increase the counter by 1.
Shooting Problem
By Motifaded, with 3 replies.
Last reply by Motifaded, over 12 years ago:
I fixed the problem.
906
907
908
909
910
911
912
X