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
how to create a Greenfoot project in Visual Studio Code
By won0c, with 1 reply.
Replied to by won0c, 3 months ago:
I found this address, but I'm not sure how to go about it.
github
Removing / Erasing pixels from a Transparent background
By MrBradley, with 1 reply.
Replied to by danpost, 3 months ago:
MrBradley wrote...
It seems that I need to use GreenfootImage#setColorAt(...) with a transparent Color(0,0,0,0) in order to remove / erase pixels, instead of GreenfootImage#drawRect(...) after setting the image color to transparent. This surprised me and seems counter intuitive. Can someone offer an explanation, please? Thanks in advance. << Details Omitted >>
Drawing is like painting. Using clear paint, you cannot remove or hide any color that might already be there. That is, opaque colors remain as is. I would suggest that you use the
clear
How to slow down timer
By Divyanshi, with 2 replies.
Last reply by Divyanshi, 3 months ago:
thank you
How to spawn actor somewhere else.
By raaeeth, with 1 reply.
Replied to by danpost, 3 months ago:
raaeeth wrote...
After my actor hit another actor, it ends the game (thats what I want). Now what I would like to happen is that after I click the reset button, my actor teleports back to the original spawn. I have the button and everything to reset, except the code for the actor to make him go back as well. How can I make an actor teleport with the push of a button?
You should be able to just start a new world (which should be equivalent to a reset). Something like this: <Code Omitted>(where
btnReset
is
Error on Greenfoot Web
By adameins, with 2 replies.
Last reply by adameins, 3 months ago:
Exception instantiating world class: java.lang.RuntimeException - (JavaScript) Error: Invalid recorded state
score counter dosnt work
By JesseJW09, with 4 replies.
Last reply by JesseJW09, 4 months ago:
It didn't work but its ok because I've found a different method for the score counter. Thanks for the help though!
Text gains double spacing when uploaded to website
By Owlias, with 3 replies.
Last reply by danpost, 4 months ago:
Owlias wrote...
one of my sprites (Goblin) doesn't get imported from the files and assigned directly to the actor. I've checked multiple times and it appears to be in there on my version (locally). Any suggestion on getting this image to be assigned? (image is naturally assigned to the actor within Greenfoot app)
You can just set the image in the constructor of the class. For example: <Code Omitted>
Image is only scaling once but never again
By toemilio, with 1 reply.
Replied to by danpost, 4 months ago:
toemilio wrote...
So I'm making a flappy bird project for my computer science class and one of our extensions is to create a powerup that makes you smaller. My problem is that the code will run perfectly once, it scales my image and makes it smaller, but every other time I run it the image stays the same. Every solution I try it will work once but never again. << Code Omitted >>
If line 3 is to be the beginning of the constructor of the class, then the keyword
void
should be omitted from the line.
I have a problem with my code
By Nordrasil, with 5 replies.
Last reply by Nordrasil, 4 months ago:
You're right. It's working now. Thanks so much for everything.
I want to reset the world using this code, butonly after like 7 seven seconds and not immediately
By LOSERrr, with 1 reply.
Replied to by danpost, 4 months ago:
LOSERrr wrote...
<Code Omitted>
Try putting the following line along with the given line: <Code Omitted>
Help with bullets
By sussywussy, with 2 replies.
Last reply by sussywussy, 4 months ago:
Nevermind, it works. Thanks danpost!
Help with contructing a world with objects in a square pattern / line
By Konsti, with 2 replies.
Last reply by Konsti, 4 months ago:
Ooooh my god thank you so much. Hard-coding levels manually would've been extremely tedious and this helps a lot. Gonna try this out now thank you so much
how to make my character jump?
By Nordrasil, with 9 replies.
Last reply by Nordrasil, 4 months ago:
Thank you so much it's working !
Projekt:2019/RoverArena how to make a good Rover
By Arena-game-help-pls, with no replies.
Hello i need help for the Game Rover Arena can anybody tell me a good code for the rover in the game. The name of the game is "Projekt:2019/RoverArena" you can find it in google
How to change character?
By sama, with 6 replies.
Last reply by danpost, 4 months ago:
sama wrote...
It works half way. I mean when Mario picks up an item, he has two chances of survival before dying. But, the problem now is that Mario doesn't change characters. Do I have to put all my images of each character for this to work?
That is one way, with each being "labeled". And, that is probably the easiest way.
1
2
3
4
5
X