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 making a movement array
By UMike, with 7 replies.
Last reply by UMike, about 13 years ago:
Actually, I got help from my professor today and she suggested that I adding this to my code and it worked: Constructor: this.xCoordinate= new int; this.yCoordinate= new int ; method array: { int currentX = getX( ); this.xCoordinate = currentX + Greenfoot.getRandomNumber (550-currentX); this.xCoordinate = currentX + Greenfoot.getRandomNumber (550-currentX); this.xCoordinate = currentX + Greenfoot.getRandomNumber (550-currentX); this.xCoordinate = currentX + Greenfoot.getRandomNumber (550-currentX); this.xCoordinate = currentX + Greenfoot.getRandomNumber (550
help with clicking an overlapped object
By completelyrubbish, with 1 reply.
Replied to by danpost, about 13 years ago:
The easiest way to solve this is to look for a click on the arrow instead of the chess. By the way, this also allows movement to square without a chess on it. If you just wanted to select a different chess and show arrows around it, you could have it so if you click anywhere except on an arrow, the arrows are removed, and if that click was on a different chess, show the arrows around it (if the click was not on a chess, no arrows will be present, and you can then click on any chess).
Public Variables
By GeneralBrae, with 5 replies.
Last reply by danpost, about 13 years ago:
Use two sets of square brackets instead of one private int coords = { { x1, y1 } { x2, y2 } { x3, y3 } ... }
IllegalStateException problem
By kiarocks, with 4 replies.
Last reply by kiarocks, about 13 years ago:
check out the new sling shot version.
Help with "mouseClicked()"
By wzl19920913, with 16 replies.
Last reply by danpost, about 13 years ago:
To achieve the following: if clicked and not flipped, flip; if clicked and flipped, select; and if selected and keystroke found, move; Use the following:
Health Points
By DMCGames, with 4 replies.
Last reply by DMCGames, about 13 years ago:
Thank you it help me a lot.
Possible start() Bug in 2.1.2 Windows build
By ez4u2c, with no replies.
I have noticed that if I add "Greenfoot.start();" to the world constructor (last statement), it works once after compile, but after clicking "Reset" the pause button flashes continuously. This problem does *not* seem to be manifest in the stand-alone build and I haven't tried the pure-java build yet. It also does not seem to be an issue for the previous 2.1.0 Windows build. You can observe this behaviour with the basic wombats scenario by adding the Greenfoot.start() statement in the WombatWorld constructor.
Creating a Rectangle
By ChrisIsOsmer, with 5 replies.
Last reply by actinium, about 13 years ago:
There is a fill() method that requires no parameters. <Code Omitted>
How to get and use Actors from an Array list..
By nikko, with 7 replies.
Last reply by danpost, about 13 years ago:
I understand, you need both references to 'trailing' and 'leading' segments in each segment (except null for 'trailing' in last segment and null for 'leading' in first segment). Very good. I wrote a quick random movement snake program, nothing but the snake moving around the screen randomly; except that you can click on a segment and split the snake into separate snakes. Interesting :/
How do I make the Screen go one step down?
By Kujamaster, with 2 replies.
Last reply by GameCode, about 13 years ago:
*make all your Actor-Subclasses go UP
Being able to download stuff into greenfoot
By winkleden, with 4 replies.
Last reply by davmac, about 13 years ago:
winkleden - if you didn't tick the "publish source code" checkbox when you uploaded the scenario, then the source code didn't get uploaded and in that case there's no way you can open the scenario in Greenfoot.
Worlds
By Kieth11, with 1 reply.
Replied to by delmar, about 13 years ago:
What do you mean - do you mean the image, or the behaviour?
Moving
By ardwennem2, with 6 replies.
Last reply by ardwennem2, about 13 years ago:
O... so that is how I can use private ... xD now I understand, thanx
Help with import greenfoot.* (I think)
By ardwennem2, with 7 replies.
Last reply by ardwennem2, about 13 years ago:
aha... thanx, that will probably be the cause... thanx again yes... it works -.-
Greenfoot versus BlueJ
By cakemk@gmail.com, with 1 reply.
Replied to by nccb, about 13 years ago:
Hi, The object bench is effectively replaced by the world. Once you have an actor in the world, you can call methods on them in the same way as you can on objects in the object bench in BlueJ. The trade-off is that while you have to extend Actor, you can make the methods have more obvious effects (moving the actor in the world, or rotating or changing image) which can make the results a bit more obvious. So my advice if you want to use Greenfoot is to make your first classes Actors, but that way you get to call methods on them. I don't think we have any plans to add the object bench to
1032
1033
1034
1035
1036
1037
1038
X