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
Turn-based battle.
By Minion1, with 1 reply.
Replied to by Minion1, almost 13 years ago:
Let me explain what I want to happen. As you wander around the world, you encounter random battles. A "battlescreen" pops up, populated with random enemies. The part I need to work on is to have a menu system in place you can select to attack the enemy one time. The enemy will then strike you one time. Then the menu pops up again. It sounds so simple, I haven't got a clue how to begin on this.
Help? How to compare a world in an if statement?
By Apple, with 1 reply.
Replied to by vonmeth, almost 13 years ago:
You need to use 'instanceof'. I can't think of another way to do it.
Get location of actor
By student101, with 25 replies.
Last reply by student101, almost 13 years ago:
Okay it works perfectly! thank u danpost!
converting strings to numbers
By paul10y, with 2 replies.
Last reply by paul10y, almost 13 years ago:
It worked, thank you really much! :D
Question
By KingAbdul, with 2 replies.
Last reply by KingAbdul, almost 13 years ago:
Thank you very much...
Greenfoot.getKey().equals("enter")/Greenfoot.getKey().equals("space")
By TopInPut, with 19 replies.
Last reply by Poli, almost 13 years ago:
Builderboy2005 wrote...
Greenfoot.getKey() returns null if no key has been pressed. To fix this, try storing the key into a string beforehand so you can test it: <Code Omitted>
thanks
Next Greenfoot version suggestion
By Game/maniac, with 7 replies.
Last reply by danpost, almost 13 years ago:
What 'super' call are you using for your world?
Recoloring a image used from a file
By TisLars, with 1 reply.
Replied to by danpost, almost 13 years ago:
If all three color parts (red, green and blue) have the same value for all the colored pixels in your images, you could check and replace the colors one at a time. Even if the color parts are fairly close in value, you could check the ranges and do the same. However, it might be best in your case to create the images yourself. You could do this programmatically; or you could use a paint program to fill/draw the areas with different colors and save each different colored/shaped image independently and change the image by setting it to a different filename.
Is it possible to change the image of a world?
By moobe, with 2 replies.
Last reply by moobe, almost 13 years ago:
Thank you so much dan!!! You are the best ;)
Top 10 high score board?
By JellyBlobsofDoom, with 6 replies.
Last reply by JellyBlobsofDoom, almost 13 years ago:
I'll try it out! Thank you! :)
How would you create a world based on text strings?
By askgriff, with 6 replies.
Last reply by askgriff, almost 13 years ago:
Wow... thank you both for your help. I am to use a system like this to create a scrolling top-down "Zelda-like" game which can be edited easily. This should help with my understanding.
PLEASEEE HELPPPP
By SpritesKing, with 4 replies.
Last reply by danpost, almost 13 years ago:
My
Crayon Babies
scenario is a demonstration of how to work with multiple worlds. The MainWorld class is the one it sets up in before start-up. When 'Run' is first hit, it goes to the InfoWorld class which returns back to MainWorld when clicked on. When the MainWorld is then clicked on, InfoWorld again becomes the active world, before going to MenuWorld when clicked on this time. Depending on your choice in MenuWorld, either MainWorld or ImageWorld will become active if 'Quit' is not chosen. I programmed it so InfoWorld will only show be
hi, i hava a problem with mi game , im doing wreck it ralph but a i have problems with my code, could someone help me?
By MichZent, with 2 replies.
Last reply by MichZent, almost 13 years ago:
thank you very much :)
how to exit greenfoot??
By fajrizarmy, with 3 replies.
Last reply by danpost, almost 13 years ago:
Very good. However, you would use <Code Omitted>for a normal exit. Non-zero amounts are used for when the program needs to be terminated for some reason other than, let us just say, that the user opts to terminate the program or the program has run its course to the end and shuts down normally.
GIF file as background
By moobe, with 2 replies.
Last reply by moobe, almost 13 years ago:
Update: Fixed the bug by changing the paint order. The problem is that it's very laggy, but there aren't many ways to solve the problem.
890
891
892
893
894
895
896
X