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
Keep Player On Top?
By sadistic_angel, with 7 replies.
Last reply by sadistic_angel, about 14 years ago:
thank you davmac that worked perfectly! turns out it was because i was trying to use repaint() not setPaintOrder(...). big help!
Accessing a variable from the world class to create an object.
By lgbrf, with 8 replies.
Last reply by davmac, about 14 years ago:
One reason to avoid static is that the value won't be reset when you use the "reset" button in Greenfoot. FWIW
one of the tutorials
(see the
documentation
) answers your question quite thoroughly.
Need Help Displaying Score!
By Fryedx, with 2 replies.
Last reply by danpost, about 14 years ago:
Do a search for 'simple score class code'.
Help !! "for" loop and non random object locations.
By tcarrigan, with 7 replies.
Last reply by tcarrigan, about 14 years ago:
I think I got it....makes sense now....thank all of you for your help ..I really appreciate it....T
Changing World image during the game
By dlanni, with 2 replies.
Last reply by dlanni, about 14 years ago:
Thank you! That works. I tried so many numbers and even if (getX() == getWorld().getWidth() - (getWorld().getWidth()-1)) !
removedFromWorld callback...
By bpiltin@unitedisd.org, with 5 replies.
Last reply by bpiltin@unitedisd.org, about 14 years ago:
I see what you're getting at, I've only run into a couple of situations where it would be useful, but to me it's probably as many times as I've found the addedToWorld method useful as well... anyway, it was just a thought.
Collision detection with an Object
By kartikitrak, with 1 reply.
Replied to by kartikitrak, about 14 years ago:
Never mind. I got it.
Array of Objects-Help
By kartikitrak, with 4 replies.
Last reply by kartikitrak, about 14 years ago:
Thank you! I am grateful.
Need more ints!
By Gazzzah, with no replies.
Using the new user data. Got this error: java.lang.ArrayIndexOutOfBoundsException: 10 at greenfoot.UserInfo.getInt(UserInfo.java:115) at gameScreen.<init>(gameScreen.java:130) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at greenfoot.core.Simulation.newInstance(Simulation.java:578) at greenfoot.platforms.ide.WorldHandlerDelegateIDE$3.run(WorldHandlerDelegateIDE.java:408) at greenfoot.core.Simulation.runQueuedTasks(Simulation.java:465) at greenfoot.core.Simulation.maybePause(Simulation.java:279) at greenfoot.core.Simulation.runContent(Simulation.java:210) at greenfoot.core.Simulation.run(Simulation.java:203) I guess that's because I'm running out of ints that I can store. How do I increase the capacity?
progress bar to follow actor
By tylers, with 4 replies.
Last reply by danpost, about 14 years ago:
Create a constructor in Bug that recieves a Bar object, send a different one to each as you create them. You will need an instance Bar variable in the Bug class to hold the bar specific for each bug. Then each bug can control their own Bar object.
Transparency
By andrewsadik, with 2 replies.
Last reply by Duta, about 14 years ago:
I assume you're asking how to remove an actor? If so: <Code Omitted>Or if you're asking how to make it invisible using setTransparency(...): <Code Omitted>
hey how can you an actor walk automatic with this code
By martijn13039, with 4 replies.
Last reply by martijn13039, about 14 years ago:
I hope you guy understand what I mean if you don“t ask me what you not understand in my question
How do i take score to multiple levels?
By chilvenl01, with 6 replies.
Last reply by davmac, about 14 years ago:
Example: <Code Omitted> You can keep the original constructor as well, so that you can still create the first world without supplying a score.
Question about Newton's lab
By rkzkIMP, with no replies.
can anybody help with the exercise 6.36 for the Newton's lab? I am trying to change/add codes for obstacle that gets switched on and off by being hit by a body. private void checkToggle() { if (!touched && isTouching()) { touched = true; toggleOn = !toggleOn; if (toggleOn) { setImage ("block-light.png"); Greenfoot.playSound(sound); } else { setImage ("block.png"); } } if (touched && !isTouching()) { touched = false; } }
Where do I get images for my game?
By MakerOfGames, with no replies.
I need help getting an image for a human character
981
982
983
984
985
986
987
X