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
getColorAt method
By nooby123, with 6 replies.
Last reply by Duta, over 13 years ago:
danpost wrote...
Sorry, I saw the lack of image and went from there, without checking anything else. You know what they say, 'Never assume!'. :< You still got 50% of the fix though, so we forgive you :p
"Saving" the World
By DMCGames, with 1 reply.
Replied to by Duta, over 13 years ago:
Yes - there are probably better methods, but I use the following (I haven't got any uploaded scenarios with multiple levels, but I've made a few) method: Once you're moving on to the next level (with the setWorld(new NextWorldName()) method), pass the objects to the next world in its constructor. In other words, you'd have it like this: setWorld(new NextWorldName(getObjects(null))) and then in the NextWorldName class, you'd obviously have to modify its code so that its constructor takes a java.util.List as a parameter, and then store it. Then, when you want to go back to the first world, you
Moving an object to the Player
By Oneshot, with 2 replies.
Last reply by Duta, over 13 years ago:
Morran wrote...
If you want the zombies to move to the player, you can try something like this:
Duplicating Actors?
By Nate, with 4 replies.
Last reply by Duta, over 13 years ago:
Nate wrote...
Hey, I figured it out. Apparently that particular piece of code needed to be in the original "if" statement in order for it to work. I have no idea why that is seeing as my other buttons worked fine. Oh well.
Maybe because of what I said?
@Akuhano about Brick breaker
By danpost, with 8 replies.
Last reply by Akuhano, over 13 years ago:
Haha yeah, that's what I've been doing with it x]
Maximum scenario size for upload?
By mal, with 6 replies.
Last reply by mal, over 13 years ago:
AIFF is Apples version of WAV
new to java programming how do i add a time limit to my card memory game..
By Waynesworld85, with 3 replies.
Last reply by extremejava, over 13 years ago:
You can either use the java.util.Date class or as suggested above use the System.currentTimeMillis() approach. Both are effectively same.
Java Classpath in Windows
Long Load Times
By Morran, with 5 replies.
Last reply by Morran, over 13 years ago:
Okay, thanks.
Scoreboard
By programmer22, with 19 replies.
Last reply by danpost, over 13 years ago:
You need to be a bit more specific. Where is your counter? How is it declared? Are you trying to get the score TO the scoreboard? Usually, the score is kept within the scoreboard class, and a reference to the scoreboard is kept in the world class. That way, methods such as getScore(), bumpCounter(int), and other counter related methods can be placed there and the act method will update the scoreboard image (if the score is in view the whole game-set).
Running Greenfoot
By dgzmart, with 1 reply.
Replied to by mjrb4, over 13 years ago:
You're probably running the JRE rather than the JDK - the former won't work. Head over
here
and grab the latest JDK - make sure to click on the button under JDK not JRE!
Help me!
By axeljamesdobsonmalmborg, with 3 replies.
Last reply by davmac, over 13 years ago:
I'd advise against running Greenfoot as administrator; you simply don't need to. If you get the warning about the scenario being read-only when you don't actually have a scenario open, there's nothing to worry about, you can ignore the warning. If you do have a scenario open (one of the examples included with Greenfoot) it just means you need to save the scenario somewhere else (and then open it from the new location) before you can work with it.
Switching image then removing.
By Mikeson, with 1 reply.
Replied to by danpost, over 13 years ago:
The reason the explode object does not remove is because you are removing 'this' from the world first. Now there is no 'world' referenced. Switch the last two lines of code and the explode should remove. As far as fraction of objects, the only ways I can think of are (1) if you build the object in parts, or (2) if you change the image to reflect the remo val at given points.
Needs help, pretty new here.
By andylcox, with 2 replies.
Last reply by mjrb4, over 13 years ago:
We'd need to see your code for certain - but the above advice is a common cause! If you have declared a populate() method then check it's the same case (Java is case sensitive) and check your curly brackets are all in the right place which can also sometimes cause that error.
Just wondering
By Duta, with 9 replies.
Last reply by toytttttt, over 13 years ago:
Yep, duta is right
Point in the right direction
By Mikeson, with 2 replies.
Last reply by davmac, over 13 years ago:
Also check out the
Greenfoot videos
(especially the ones on shooting).
1014
1015
1016
1017
1018
1019
1020
X