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
Just curious, why does Greenfoot.setLocation(getX(), getY()+1) make it go down?
By LakeOtis, with 4 replies.
Last reply by LakeOtis, over 9 years ago:
davmac wrote...
Actually, I'm curious what you expect this to do? (Did you mean you would expect it to cause an actor to move
up
)?
Yes, I thought that adding to the 'y' variable would make it move up and vice versa.
Why is my Greenfoot not compiling and crashing often?
By mehanix, with 2 replies.
Last reply by Nosson1459, over 9 years ago:
I also noticed the problem of Greenfoot sometimes not compiling. When this happens I close Greenfoot then reopen it and it compiles. As for failing to save to disk, this only happens to me when I try saving to a network and is disconnected for the moment but is usually connected.
Player Actor facing mouse similar to Hotline Miami
By Tezzsyhr, with 8 replies.
Last reply by Nosson1459, over 9 years ago:
Tezzsyhr wrote...
but the part I'm stuck on is the actor facing the mouse. If the mouse is stationary, the actor stops turning to face it. Is there a way to get the actor to always face the mouse regardless?
So to answer your question the reason it happens is because YOU added in an if to purposely make it happen, all this if does is make that happen. The if to remove is the one mentioned above. <Code Omitted> when I removed this if it worked fine.
High Scores
By Nosson1459, with 9 replies.
Last reply by Nosson1459, over 9 years ago:
Super_Hippo wrote...
Make an unbounded world and just add all. Then you need a way to scroll down, so move all objects upwards. You can also change the scoreboard, so more results are fitting on the screen.
I guess so, but I was looking for something like the way "bourne" did it, which I guess I can just look at his code.
Btw, for testing purposes, you can check the highscore table in Greenfoot, too. Press Ctrl+Shift+P to change to name, run the scenario to get the score for this "player", then change the name again and so on. This way, you can fill the highscore table offline
Running animation?
By N00balert, with 1 reply.
Replied to by Super_Hippo, over 9 years ago:
The array could look like this: <Code Omitted> Then you can have an int field. Whenever the animation should run (when the right key is pressed), increase this field and set the image: <Code Omitted>
Greenfoot wont load
By Valiworld, with 1 reply.
Replied to by davmac, over 9 years ago:
See
this discussion
. (Remember to select the "other" category for discussions which aren't about programming; I've changed the category for you).
Greenfoot stalled on splash screen
By MrBradley, with 2 replies.
Last reply by MrBradley, over 9 years ago:
I do indeed have the latest nVidia driver. I will roll back 1 version. Thanks.
Set target location for an Actor in a Scrolling World
By Super_Hippo, with 2 replies.
Last reply by Super_Hippo, over 9 years ago:
Great, I just needed to change line 17, 18 and 25 without adding any method or anything. Thank you very much! <Code Omitted>
Need help with sharing variables across actors
By WhiteWolf37, with 1 reply.
Replied to by Super_Hippo, over 9 years ago:
What are you trying to do?
How to set last image of an animation.
By nat12, with 5 replies.
Last reply by Super_Hippo, over 9 years ago:
The problem is that the actor is moving more than one cell each act cycle and he moves all together without checking in between if he reached the platform. To make it move step by step and check between every step, you could change the falling method to this:
Question about the World's showText() method
By nelutux, with 2 replies.
Last reply by davmac, over 9 years ago:
I guess you mean you want the text shown to disappear after a few seconds. Did you try reading the documentation? :)
Show some text centred at the given position in the world. The text will be displayed in front of any actors.
Any previous text shown at the same location will first be removed
. Parameters: text - The text to display;
can be null to show no text
x - X-coordinate of the text y - Y-coordinate of the text
So: after a few seconds, call showText again with the same co-ordinates but
null
for the text (or the empty string as s
Need Help on Chapter 4 Crab Game
By mkirkendall, with 3 replies.
Last reply by mkirkendall, over 9 years ago:
So for the problem with 'import', I found that my mistake was that I rewrote 'import greenfoot', which was originally at the top of my code. I put the content in the code I showed you and I placed it under the original 'import greenfoot' and the code worked. Thanks again for your help.
Problem with running greenfoot
By Vacras, with 4 replies.
Last reply by Vacras, over 9 years ago:
FFS I have just fixed my problem: Avast Antivirus was causing the problem, I figured it out while I was recording a video to demsontrate my problem and while I was trying to show, that no programms are running I realzied AVAST might be the problem! So in short for anyone who comes across this problem:
Try deactivating your antivirus software!
Healthbar Bugs
By Theangryman, with 10 replies.
Last reply by Theangryman, over 9 years ago:
Sorry I couldn't reply in a timely manor, but thanks for the input guys, I managed to get things working the way I wanted them too.
timer
By gergoa12, with 1 reply.
Replied to by Super_Hippo, over 9 years ago:
Create an int field which you can use as a timer: <Code Omitted>Whenever you shoot, set the timer to some value (3 seconds is about 170 I guess). <Code Omitted>Each act cycle, you reduce the value by 1 if it isn't 0: <Code Omitted>Before shooting, check if the shotTimer is 0, you can also use it right after the last line, so: <Code Omitted>
400
401
402
403
404
405
406
X