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
Getting one object of certain class via coordinates
By Segara, with 3 replies.
Last reply by danpost, over 13 years ago:
Segara wrote...
Well, as you saw in the code, I do create objects of A class, but don't save them anywhere.
I matters not whether you have saved them or not, or even whether you create and add them to the world or not. If the method does not find any objects of the given class whose image overlaps the location given, then the method will return null. It is the location that is important. If you place a Back object at location (8, 8), then using getX() (or getY()) in the back class will return 8 for that Back object. If you use 'getOneObjectAtOffset(4, 4, null)' for that Back objec
.JAR file in Java
By doughauf, with 3 replies.
Last reply by davmac, over 13 years ago:
If you install Greenfoot you will find various jar files in the installation. At least the main one, greenfoot.jar, will be necessary for building scenarios externally. You will not easily be able to run your scenarios from outside Greenfoot. That's about as much information as I can give you, as building scenarios outside of Greenfoot isn't something we really support. Someone else may be able to offer help.
How to upload a scenario??
By Kaiwalya, with 2 replies.
Last reply by danpost, over 13 years ago:
The 'Share' button near the top-right corner of the Greenfoot application frame initiates a dialog where the 'Publish' tab (at the top) is used to upload your scenario on the Greenfoot site. Just fill in the information, check the appropriate boxes and click on the 'Share' button.
scrolling
By Will_Taylor, with 1 reply.
Replied to by Gevater_Tod4711, over 13 years ago:
If you want a scrolling system for your game you can use a scrolling world demo like one of these:
Infinite Scrolling World
Scrolling SuperWorld
Shooting
By eddietheboss27, with 3 replies.
Last reply by RahulUK, over 13 years ago:
Thanks dude
Image manipulation
By Game/maniac, with 1 reply.
Replied to by danpost, over 13 years ago:
What precisely do you mean by 'map an image to a polygon'? And is this something you want to do programmatically (while the scenario is running) or is it something you want done for programming it?
Try our game? School Project
By dan95neva, with 6 replies.
Last reply by dan95neva, over 13 years ago:
Thanks
How to move after faced a certain direction
By lweave14, with 1 reply.
Replied to by Gevater_Tod4711, over 13 years ago:
The problem is that you use a string to check the rotation like in line 7 (I think in line 7 the "0" should be "90"). The problem is that rotation is an int and "0" is a string. And the check for string.equals(int) will always be false. If you just use: if (rotation == 0) { ... it should work. And in lines 5, 11, ... it would be a bit easyer to use: if (Greenfoot.isKeyDown("keyname")) { ... instead of comparing the current pressed key. But your solution also would work.
The permission to use some of the pictures from greenfoot as the cover of a thesis
By rowanto, with 3 replies.
Last reply by rowanto, over 13 years ago:
Yeah it's not for profit. Thanks :-)
Get Actor to move infinitely back and forth until the player wins
By brandondamante, with 3 replies.
Last reply by danpost, over 13 years ago:
Adding the boolean field 'a' and method 'isMoving' was not required, or even needed. In fact, as far as I can tell, you are not even calling the 'isAtWorldEdge' method; so, it is not a factor. Since you do not need to use any of the methods you supplied in the Character class, I have the Guard1 class extending the Actor class below; however, you could still put the act and move methods below in a Character or Guard class so more than one class can have the behavior of moving back and forth and have those classes extend it. This is the basic code for an actor to move back and forth from
i am trying to stop my music from my 1st world with my 5th world. what am i doing wrong??
By qsapp.3, with 18 replies.
Last reply by danpost, over 13 years ago:
A much simpler solution is to make the GreenfootSound field in the Cover class 'static'. <Code Omitted>Then the method to stop the sound in the Cover class would be: <Code Omitted>With this, you do not have to pass anything from level to level. Just start the loop in the Cover class and use the following in the Level5 constructor to stop the loop: <Code Omitted>
Greenfoot or BlueJ
By AlMcInnis, with 5 replies.
Last reply by AlMcInnis, over 13 years ago:
Thank you all, I think I will start them with Greenfoot, and run them through the exercises in the book (have to buy the book first). This should get them started, and potentially mostly on their own while off for the summer and when I am at work.
Greenfoot + Kinect + Ubuntu 12.04??
By trier, with 1 reply.
Replied to by MarioFeles, over 13 years ago:
Fala Pereira ja compro o Kinect.....é o Mario :D
Stress with colours
By Kartoffelbrot, with 2 replies.
Last reply by Kartoffelbrot, over 13 years ago:
thanks
How do i change the font, size, and color of the text??
By qsapp.3, with 4 replies.
Last reply by danpost, over 13 years ago:
There would be a lot more involved if you actually wanted to change the font style as well (importing the Font class and applying the font style to an image before drawing a string on it).
811
812
813
814
815
816
817
X