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
Controlling Sound For Game --- Need Help!
By geekykid2013, with 10 replies.
Last reply by landry, over 13 years ago:
http://www.greenfoot.org/scenarios/8649 look at what i made to demonstrate what i mean , it should be helpful
How to make an object disappear when contact with wall?
By Blakehammond, with 1 reply.
Replied to by Gevater_Tod4711, over 13 years ago:
To check whether an object intersects another you can use the method
getOneIntersectingObject(java.lang.Class clss)
. To remove an object use
getWorld().removeObject(Actor actor)
.
UserInfo multiplayer
By JetLennit, with 4 replies.
Last reply by FlyingRabidUnicornPig, over 13 years ago:
I had an idea to work on a Chess for UserInfo, but it was a bit complicated and I soon had other ideas and projects I wanted/needed to work on, so I never got to it. It wouldn't be too hard. You would send an int and a string for coordinates, or two ints, or two strings or whatever, and then send another string or int that specifies which piece was moved. Then the rest would be creating the game and rules itself.
Null Pointer Exception
By Student_Troy, with 1 reply.
Replied to by danpost, over 13 years ago:
Remove line 11 from the code above (i--;). You may be removing an object from the world, but it is still in the list; so you do not need to decrease its value.
Turn one object around another
By Solringolt, with 8 replies.
Last reply by Solringolt, over 13 years ago:
Ho my god! Thank you! Didn't know I could do that! Many of my problems just got solved! Haha thx!
Help with movement
By programmer274, with 1 reply.
Replied to by programmer274, over 13 years ago:
Here is my code I am just trying to figure out how to get the object to start moving up in the first place and have the if statements still workimport greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) /** * Write a description of class Zone here. * * @author (your name) * @version (a version number or a date) */ public class Zone extends Actor { private int uSpeed = -8; private int dSpeed = 8; private boolean atEdge; /** * Act - do whatever the Zone wants to do. This method is called whenever * the 'Act' or 'Run' button ge
Jump 'n' Run Minigame
By Firewall, with 1 reply.
Replied to by Firewall, over 13 years ago:
The Stream is online :)
Enemies with different health number
By Fadel, with 6 replies.
Last reply by Fadel, over 13 years ago:
Thanks got it working ! You saved me :D
alert
By landry, with 38 replies.
Last reply by landry, over 13 years ago:
I'll upload the final scenario of the website by tomorrow i don't know the exact time but THANK YOU ONCE AGAIN!!!!!!!!!!!!!!!!!!!!!
How do i access a variable from my World class
By Yongjoon, with 2 replies.
Last reply by Yongjoon, over 13 years ago:
i was trying to make it public in the world so any actor in said world could use the health variables
Is There A Way To Write A Method To Do Something Like ".getGreenfootSounds"?
By deiseigei, with 3 replies.
Last reply by Solringolt, over 13 years ago:
No problem mate : )
Will Not Recognize Any Classes In Greenfoot (for world.getObjects())
By deiseigei, with 3 replies.
Last reply by FlyingRabidUnicornPig, over 13 years ago:
Your welcome. :)
Music of gameplay
By Rudi, with 1 reply.
Replied to by danpost, over 13 years ago:
The Greenfoot class only has a method to start background music. It does not have any other methods to control the music. The GreenfootSound class, however, has all the basic controls for playing sound/music. Create a new GreenfootSound object using your music filename and save that object in an instance or class variable. Then you can execute any method provided within the GreenfootSound class on that object.
cannot change the world
By kill, with 4 replies.
Last reply by danpost, over 13 years ago:
In what class is the error occurring (show the code around which line is highlighted).
Not moving after a while
By Nike.Sprite, with 3 replies.
Last reply by danpost, over 13 years ago:
(1) then you should not need to set any rotations at all (since rotation starts out at zero anyway); (2) nothing, just wasted code (since calling 'canMove' does exactly the same thing); (3) you should already have a valid 'orientatie' value by the time you call the 'move' method; that method can be reduced to:
828
829
830
831
832
833
834
X