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
Need help decrementing Lives
By karolis, with 4 replies.
Last reply by danpost, over 12 years ago:
getWorld: method of the Actor class that returns the World object that the actor is in (null is returned if the actor is not in a world) getObjects: method of the World class that returns a List object containing all objects created from the given class that are in a world (or all objects if the argument given is null) size: method of the List class that returns the number of elements contained within a list By checking the API documentations on these classes, you can trace any dot notational expression from the first part to the end part and determine what it returns. Actor>World>List>i
How do I make vertical sidescroller from a normal sidescroller
By nc-munk, with 3 replies.
Last reply by danpost, over 12 years ago:
Instead of '(position, 0)' use '(0, position)' and similar with the other drawImage arguments.
Counter not working? ... - School project
By JesperWR, with 1 reply.
Replied to by danpost, over 12 years ago:
The problem is that in line 19 of your Board class, you are creating a new variable 'counter' (which is not the same as your instance 'counter' field. Remove 'Counter' from the beginning of that line so that 'counter' in that line will refer to your instance field. That should fix it (or at least help to).
School project like the game Fall down
By Fws, with no replies.
Hi everybody! I am going to make a school project in Greenfoot. I am having a hard time getting started with this game, so i was wondering if anyone had some ideas for me a and my partner to get started. The game we are going to make is a lot like this game called Fall Down (http://www.albinoblacksheep.com/games/falldown) All most anything can help us! THANKS!
Change center of an actor for getObjectsInRange method
By Jonche, with 1 reply.
Replied to by davmac, over 12 years ago:
One way to achieve this is to move your human actor, call getObjectsInRange, and then move your human back to the original position.
Help please
By pingerdaze, with no replies.
i
2 Small, probably easy fix problems
By DarkMageCkmario, with 2 replies.
Last reply by DarkMageCkmario, over 12 years ago:
haha thank you, bear with me I'm very new and very very bad at this
Creating a camera that follows the player
By craigd04, with 1 reply.
Replied to by JetLennit, over 12 years ago:
Just go
here
and look around in the code of some of the scenarios
Error message when hit worldEdge
By JesperWR, with 6 replies.
Last reply by JesperWR, over 12 years ago:
Alright danpost, thank you very much for your time :)
Help me with the method
By Zcrox, with 1 reply.
Replied to by danpost, over 12 years ago:
You need to be more clear on what you want or are looking for. What method? or maybe you do not realize that a method is a separate block of code that is executed when called and maybe you should be using different terminology.
Controlling the movement of 2 objects with 1 class
By patrick26, with 7 replies.
Last reply by danpost, over 12 years ago:
Remove this from your PongWorld class: <Code Omitted>Your two 'addObject' lines for adding the paddles in the PongWorld constructor should look like this: <Code Omitted>In your Paddle class: <Code Omitted>Also, in the Paddle class, change your act method to this:
Limiting how many enemies spawn
By Ghost_Nixon, with 3 replies.
Last reply by danpost, over 12 years ago:
This is what I meant: Change line 37 to: <Code Omitted>
Variables in a Try / Catch statement
By CHAPMAF, with 7 replies.
Last reply by danpost, over 12 years ago:
CHAPMAF wrote...
How do i make an instance field?
This should have been a hint.
danpost wrote...
Variables declared within a method will only last until that execution of the method is completed.
Declare the field outside the method. Usually, they are placed at the top of the class code. Please refer to
Overview: Subclassing in Greenfoot
.
Shooting Left and other things
By Al7amed, with 5 replies.
Last reply by Al7amed, over 12 years ago:
Thank you man .. its work now
static / non-static confusion
By SandDealer, with 7 replies.
Last reply by danpost, over 12 years ago:
SandDealer wrote...
Allright so your sugestion is to make more wold classes (4 in this case) and therefore "Set" method should choose what world is active at the moment, am I right?
I do not see where anyone suggested that. davmac suggested that you pass a reference of the world through the to the 'set' method. This would mean your controler object needs to be in the world or a reference to the world will need to be passed either to the conroler object itself when you create it or to the 'createAmap' method when you call it. I suggest you make the 'izbor' string 'static' so that
711
712
713
714
715
716
717
X