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
Simplify my animation code
By Solringolt, with 1 reply.
Replied to by danpost, about 13 years ago:
You could replace lines 110 through 173 with: <Code Omitted>
How to place sound once
By jaydjay, with 9 replies.
Last reply by FlyingRabidUnicornPig, about 13 years ago:
What's he's saying is to put the hasIntroPlayed outside of the method. The sound keeps looping because you made a variable inside a method, that turns back to false every time the method is called (which is every frame). If you have the variable outside the method, it will be available to all your code inside the class, and won't ever change unless you tell it to.
Object interaction - ask questions
By Phytrix, with 2 replies.
Last reply by Phytrix, about 13 years ago:
Yeah that looks like what I'm looking for. Thanks henrYoda :) Also though, what's the most effective way of creating a random selection of questions without having long and strenuous code?
How can I make counter shop?
By Miikku, with 3 replies.
Last reply by Miikku, about 13 years ago:
ok
how to make ghost die properly until it reaches ghost healer?
By gquach, with 1 reply.
Replied to by Kartoffelbrot, about 13 years ago:
<Code Omitted>
How to add an obstacle?
By forest, with no replies.
I want to add obstacles in my scenario such as tree branches so that it blocks my character's movement. I want it so that my character will not able to move through the obstacle.
"java.lang.OutOfMemoryError: Java heap space" greenfoot terminal error
By JayWood860, with 13 replies.
Last reply by ColeoCofer, about 13 years ago:
You could also cache the images by declaring them static, that way they all share the same image: private static GreenfootImage image1 = new GreenfootImage("space.jpg");
Is there a way to make the Counter count more quickly in my game?
By AreegeJendi, with 1 reply.
Replied to by danpost, about 13 years ago:
If all changes in the score are multiples of ten, then you could change the 'act' method to the following: <Code Omitted>
Problem with code
By Nsalhan01, with 4 replies.
Last reply by Nsalhan01, about 13 years ago:
Thank you very much. Would you happen to know how to play a sound file when the game ends or include pop ups in the game?
NullPointerException with setPaintOrder()?
By FlyingRabidUnicornPig, with 2 replies.
Last reply by FlyingRabidUnicornPig, about 13 years ago:
Well a I already know abstracts work, LightActor and UseableActor are abstract. I wished interfaces would work. I don't want an empty abstract class that any HUD items need to extend, especially since a couple of the HUD implemented classes extend other objects...
Ideas to make grenade?
By Miikku, with 1 reply.
Replied to by FlyingRabidUnicornPig, about 13 years ago:
A Grenade actor would need several things, a time limit to detonation, a blast radius, and affecting specific actors around it are the three biggest things that come to my mind. A detonation is easy if you know how to create counters that count down or up to the time. The blast radius and affecting other actors is a little bit harder. You need to use getObjectsInRange() to find actors around the grenade, and then affect them accordingly. Here's an example of how to use getObjectsInRange():
Everytime it changes the world, but why?!
By JesusJesus, with 30 replies.
Last reply by JesusJesus, about 13 years ago:
Sry i have only my ipad now and not the computer, but i have no error. I removed the && reload.getWorld() == null in your code and now it works, and at this time i cant see any laggs. Thank you
Enemy starting spot help
By jaydjay, with 6 replies.
Last reply by Gevater_Tod4711, about 13 years ago:
I think your ghostAi method is the problem. Try using this method:
User info question
By Game/maniac, with 9 replies.
Last reply by davmac, about 13 years ago:
Ok, so read the tutorial linked above and ask specific questions if you need more help.
Animation of Pacman
By jaydjay, with 6 replies.
Last reply by davmac, about 13 years ago:
That doesn't make sense. You need at least two images for animation - one with the mouth open and one with it shut. If you have only two images and you want to slow the animation, you have two choices: move less often, or do not animate every time you move. (You'll never get it to look like the original pacman this way; you need more images).
831
832
833
834
835
836
837
X