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
Updating Score
By BadatCoding, with 4 replies.
Last reply by BadatCoding, almost 13 years ago:
Thank you davmac!
having lifes
By tylers, with 4 replies.
Last reply by davmac, almost 13 years ago:
Like Morran said:
In your Player class, add a "boolean" called "isDead", and add an "int" called "timeToRegenerate"
To declare those variables you'd use code something like: <Code Omitted> As these are to be instance variables, they should be declared inside the class but not inside any method!
helping with a bug in my code
By martijn13039, with 13 replies.
Last reply by davmac, almost 13 years ago:
ttamasu, I think the problem is not multiple objects getting eaten per cycle, but rather multiple objects getting eaten over multiple cycles but before the first one respawns. There's no way to fix this without adding a collection to the concierge class or moving part of the logic to the student class.
making a world scroll vertically
By Flourytub43, with 1 reply.
Replied to by erdelf, almost 13 years ago:
Did you looked at the code of the scrolling scenarios? Maybe you can change it.
Calling an object's methods
By dark_sky, with 4 replies.
Last reply by IsVarious, almost 13 years ago:
A tip for code placement: It's normaly a good idea to put code in the place it makes the most sense, so for your example above. Are you wanting to player look for the box, or the box look for the player? it may seem like a subtle difference, but as a project expands, it does help to place code in natrualy logical locations.
Variable from another world?
By MrDoomsday, with 2 replies.
Last reply by IsVarious, almost 13 years ago:
So for example if your variable was "pizzaLeft", you would declair it as 'public static int pizzaLeft;" this would enable you to access it from another level.
Creating a New World
By theDoctor, with 5 replies.
Last reply by IsVarious, almost 13 years ago:
lol, in the constructor of the new level, set the location of where you want your actor to be added, think of this like you're working with your first level, but you can have many different. you can also setup conditions if they are met after leaving that building, where you want your actor to be placed. here's the same code we used for our final project which did this exact same thing.
Help with movement code
By DAustin15, with 11 replies.
Last reply by danpost, almost 13 years ago:
Well, after having a look at the board, I can tell, that this will not be as easy as I had believed at first. Also, with 4 pieces on the board at the same time, you certainly do not what them landing exactly on the same spot when on the same square. That adds another level of complexity. However, with the proper helper objects, and object image manipulation, I believe we can make it work. I am thinking about an array of Pad objects (invisible 'landing' pads for the pieces; 40 of them; one for each spot on the board that a piece can land on). They each can have a reference to the spot in
I can compile it, there are no errors for the code but then something happen
By martijn13039, with 2 replies.
Last reply by martijn13039, almost 13 years ago:
Plz Could somebody help me because I have really no idea, and it is really anoying because the game work fine but the wole time if i am playing wil come thise window but i could still playing the game some advice plz?
bouncing of walls
By tylers, with 4 replies.
Last reply by tylers, almost 13 years ago:
how do i stop it from bouncing from one wall to another in the same place
fixed it
Referencing Strings from another class.
By JayWood860, with 1 reply.
Replied to by JayWood860, almost 13 years ago:
As for the textbox, the method is irrelevant at this point i did not mean to add it. just the parameter to show that i was adding it to the world correctly. and if this was not previously stated, there are no syntax errors through the program, just this issue i have right now.
Levels
By Matt, with 6 replies.
Last reply by trash1000, almost 13 years ago:
Apart from different worlds you could always go and use files to read out the structure of a level. However, it's highly dependent on how your levels are structured.
Removing Actors
By Matt, with 2 replies.
Last reply by Matt, almost 13 years ago:
I dont really understand the things written on that page :(
How to exit only when door is open.
By dlanni, with 12 replies.
Last reply by dlanni, almost 13 years ago:
Thanks so much. I'll get to work on this .
Need a little help with java.awt.Graphics
By darkmist255, with 25 replies.
Last reply by danpost, almost 13 years ago:
@pyrokey3, in your code, lines 6 through 9 can be replaced with this one line <Code Omitted>
967
968
969
970
971
972
973
X