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
removeTouching method
By SATH8888, with 2 replies.
Last reply by danpost, over 9 years ago:
SATH8888 wrote...
i a trying to use simple methods to remove an object when it is touched by another. i have tried isTouching and removeTouching but it gives me incompatible types error. can anyone tell me the right way to use this method??? thanks in advance.
In a simple variable assignment line like the following: <Code Omitted>The return type of 'methodName', or any literal, or the result of any expression evaluated on the right side, must be of type 'VarType'. If the method returns a boolean value, which the method 'isTouching' does, then that value
Change anchor point of Actor
By Genora51, with 7 replies.
Last reply by danpost, over 9 years ago:
Genora51 wrote...
Ps : to Danpost - I don't think I have seen a single forum post that you haven't replied to. Thank you so much for the help you have given on so many occasions to just about everyone. (Are you one of the developers of greenfoot?)
You might want to see
this discussion.
getWorld(); not found?
By Laurence, with 1 reply.
Replied to by Laurence, over 9 years ago:
Nevermind, I resolved it, found out that worlds already had world-related methods already at the disposable.
getMicLevel() not working
By proboardslol, with 6 replies.
Last reply by amjad, over 9 years ago:
Could you please send your debug-log and the description of how you get the error to us, as described in: http://www.greenfoot.org/support ?
What code do I need to reload after 10 seconds?
By Dudimus, with 6 replies.
Last reply by Dudimus, over 9 years ago:
It works, thanks!
java exercise 3.32 (completely lost - please help)
By bonney, with 4 replies.
Last reply by cabennet, over 9 years ago:
I am trying to make this work as well. I cut and past from bonney, still no luck. I tried the sound recorder and it works fine, Greentfoot recognizes the mic. Any help would be appreciated. <Code Omitted>
how to add a score counter?
By NAMYA0303, with 4 replies.
Last reply by danpost, over 9 years ago:
danpost wrote...
We will need to see the code for the Counter class (which is the blueprint for a Counter object) and the code to your world class (which should create and add a Counter object into the world).
You have only shown one of the two mentioned here. As far as the Counter class, it is a waste of cpu time to recreate the image of the Score object every act cycle when the score only changes once in a while. Change 'act' to 'updateImage' and do the following:
how to add a game over screen (my actor dies when touches the edge)
By NAMYA0303, with 4 replies.
Last reply by NAMYA0303, over 9 years ago:
thanks alot!!!!! u helped me with this game (: (: (; (; thnxxxxxxxxxxxxxxxxxx
how to kill my character if it touches the edge of the stage
By NAMYA0303, with 13 replies.
Last reply by ProfAvi, over 9 years ago:
if (atEdge()) getWorld().removeObject(this);
Add multiple same objects(fail)
By loxtn10, with 6 replies.
Last reply by loxtn10, over 9 years ago:
thanks
Super_Hippo wrote...
You can multiply 'i' by something to have a bigger gap.
got it . problem solved, thanks
How to make a Game timer about 60 seconds which will show game over?
By Dudimus, with 14 replies.
Last reply by danpost, over 9 years ago:
Dudimus wrote...
is there any code I could type that would make the zombies' image not go on top of Chased's picture at all (hopefully solving the glitch problem)?
There is the 'setLocation' method. When touch occurs, you can use it to separate the two actors so they are not touching. But, you will need to do more to ensure that the zombie does not immediately move back into the chased and cause more lose of health before some time (your preference as to how long) has elapsed.
Exporting a project with libraries
By fejfo, with 1 reply.
Replied to by fejfo, over 9 years ago:
I solved it with a by decompiling the library a dirty solution. So I still want to know the proper solution
Need to display the time at the end
By BEASTYLAD, with 6 replies.
Last reply by BEASTYLAD, over 9 years ago:
Don't worry i used what you gave me earlier and put it into display3() THANK you very much.
Falling issues
By AuroraGamer, with 3 replies.
Last reply by Super_Hippo, over 9 years ago:
This is probably not perfect, but an example how to do it for the left side. The problem you will be facing is that if you for example walk in one direction and change the direction, the image may change a few act-cycles too late. To avoid that, you could use a field to track the current direction and if the direction is changed, you set the 't_animation' to 9, so the first image is used instantly.
Cannot see compile error messages?
By Kytuzian, with 1 reply.
Replied to by fejfo, over 9 years ago:
I think this is because the compiler doesn't now exactly what is wrong just which line and the type of mistake so it can't always give you the exact world in which the mistake was made. And you can see which type of syntact error there is on the bottom left
444
445
446
447
448
449
450
X