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
Problems with scaling and get objects
By khriz_mg, with 1 reply.
Replied to by danpost, over 11 years ago:
I suggest you never scale the original image; but, each time, scale a copy of the one you need to use (using 'getImage' returns the same image that you set to the actor, not a copy of it). Rescaling the same image over and over again can cause the unwanted effects you are encountering.
Agar.io
By cellostar47, with no replies.
Someone should make Agar.io (with AIs not multiplayer...)
Joining a group. how do i join a group in green foot and submit in a collection
By mosNeammanee, with 1 reply.
Replied to by danpost, over 11 years ago:
You cannot submit a scenario directly into a collection. You must first upload (share) the project to the site; then ask for it to be added into a collection. Even if you have you own collection, it would be done the same way (except you do not have to ask for it to be added -- you just add it yourself).
Creating levels
By Marc, with 2 replies.
Last reply by Squirrel98, over 11 years ago:
You can also switch the level when another actor is touched <Code Omitted>
Actor won't get added
By hubert14, with 3 replies.
Last reply by hubert14, over 11 years ago:
Thank you, danpost! You're totally right, I did that in a terrible way haha. Wow. Thanks for your help guys!
Add Delay to Animation
By greg.w902, with 1 reply.
Replied to by danpost, over 11 years ago:
As is, the range of values of 'currentImage' is equal to the number of images being used in the animation. If we let 'currentImage' go to twice the number of images and change the image every other time, we will effectively double the animation time, or cut the animation speed in half (it would take twice as long for one cycle of the animation to complete); or increasing the range limit to three times the number of images and changing the image every third time, it will slow down a bit more. Use:
Problem with making balls bounce off world edge
By Lesedi, with 2 replies.
Last reply by danpost, over 11 years ago:
Remember that you are considering the horizontal and vertical (axial) movement separately. Hint: movement is a product of
speed
and __________? (you will need fields for both when considering each axis) Hint2: which of these two factors change when a bounce occurs? and how?
I need help!!!
By Ceomzzy, with 1 reply.
Replied to by danpost, over 11 years ago:
I could give you an elaborate solution to this. However, it may end up to be much more than what is really necessary. With more information about your scenario (the objects in question), the best solution for the situation would be more obvious. Like, if there is only one object of the type that is first eaten in the world, then you can just check for any of that type object in the world to determine if an actor2 object should even be tested for (that is, provided that the type object first eaten is in the world for the entire time the eater, actor1, is in the world up until the time that i
Game Over Screen
By Anthony182, with 1 reply.
Replied to by danpost, over 11 years ago:
There are several ways to accomplish this. You could create a GreenfootImage of the text and draw it directly on the background or set it to an actor and add the actor to the world. You could do either of these in the current world or in a separate world.
Glitches
By shannonf0126, with 3 replies.
Last reply by danpost, over 11 years ago:
What is the code you use for collecting a coin? Do you access a method or a field in a World subclass to register a coin being collected? Go through your actor class codes and search for "LevelOne". If you find it in any of them (like in that class of the object that collects the coins, maybe) and you have objects of that class in your LevelTwo world, that may be the location of your problem. You can still use those object in more than one world type; but, you must determine the type of world and cast the world properly before accessing the method or field.
Knockback error
By hopevalley, with 1 reply.
Replied to by miningmanna, over 11 years ago:
why do you minus PI with your degrees?
Shooting Help
By Squirrel98, with 5 replies.
Last reply by Squirrel98, over 11 years ago:
Thanks for you help
Wall crash
By 17jrousso, with 1 reply.
Replied to by danpost, over 11 years ago:
If both walls are placed into the world at the same x-coordinate location within the same code fragment, then they will both reach the left edge of the world at the same time and they can each remove themselves at that time: <Code Omitted>The act method will run for both walls each act cycle and both will be removed on the same cycle. The error was mainly due to the order of execution of the two lines. You were checking for edge and potentially removing the actor before hav
Animation
By JeppDev, with 1 reply.
Replied to by danpost, over 11 years ago:
There are a couple of ways to do it without using 'if' statements. One way is to name each set of images with the same name suffixed by a sequence number. The other is by using arrays for the images. Either one of these would require an int field to track which image is the current one being used.
I have a problem with my scenario only wants to run in greenfoot
By JeppDev, with 14 replies.
Last reply by JeppDev, over 11 years ago:
All problems are gone, the one that is published now is working fine and the sprites come from
Sprites
The problem wasn't even directly in the code I gave, it was some code that acted up in another acter when this one tried to spawn it in
555
556
557
558
559
560
561
X