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 have an object fixed on another?
By y0us, with no replies.
Hi, I want the container, when the crane drops it on the truck, to stay on the truck when it drives away. Now I have done a similar thing to the containers on the ship, when it arrives. If I try to do that on that same manner I have to give the argument 'vrachtvoertuig' (truck) to the container, as it also have '(schip)', like this: <Code Omitted> But what I think the problem is, it doesnt allow it to have two arguments. As it gives this error: <Image Omitted> Whats wrong?
Greenfoot database
By Roxana, with 2 replies.
Last reply by Roxana, almost 13 years ago:
I don't want to write on the site, I just want to make a project for school, and keep it on my computer . And I need to make it more complex and that's the most complex thing that I can think of, I don't know what else I could do ..
when arrive edge of window
By mohamed.talaat99, with no replies.
when use move(1) actor move to right and stop in the edge i need when arrive edge return back How ? thank you
Let an object follow another object
By UNDEAD_DC, with 25 replies.
Last reply by danpost, almost 13 years ago:
You could just put this in the world act method: <Code Omitted>When adding the objects, however, you must then always add the TrucksBack object into the world first during play. Then, in the TrucksBack class, add the following method: <Code Omitted>However, better is to check this before adding a TrucksBack object into the world.
Changing actors when coming into new world
By swendleys, with 9 replies.
Last reply by danpost, almost 13 years ago:
Just like declaring a local field; <Code Omitted>This assigns a value 'new Terrein()' to the field named 'terrein' that is declared to hold a value of 'Terrein' type (just list the value '50' is assigned to the field named 'n' that is declared to hold a value of 'int' type). Then just refer to 'terrein' for that world.
Im stuck
By swendleys, with 7 replies.
Last reply by swendleys, almost 13 years ago:
Thank you very much for your help! It works perfectly!!
Delaying actor creation?
By DSP512, with no replies.
How can I delay the creaton of an object in the world? It should be created only once, so its addObject-method is in the world's constructor. But how can I delay this method?
How do you make a image smaller?
By Bean4221, with 1 reply.
Replied to by JetLennit, almost 13 years ago:
Go
here
, click "GreenfootImage" then look at the scale() method
Cannot find symbol "canSee"
By Bean4221, with 1 reply.
Replied to by Bean4221, almost 13 years ago:
never mind, found it out XD
Stuck! Move object problems , help!
By roidrage, with 3 replies.
Last reply by danpost, almost 13 years ago:
IIn the act method of the Truck class, you have this: <Code Omitted>'x' (or 'getX()') is zero when the Truck object is at the left edge of the world.
problems with adding object
By deathburrito16, with 1 reply.
Replied to by davmac, almost 13 years ago:
You called the variable 'sherman', not 'Sherman'. You need to use the same name in the reference as you do in the declaration:
getWorld().addObject(
Sherman
sherman, 100, 300);
playing sounds/music in background
By Banjo, with 2 replies.
Last reply by davmac, almost 13 years ago:
in the act() method.
Do
not
do that in the act method, or you will end up with the song playing over itself multiple times. Do it the world's started() method, for instance.
Help with changing a Subclasses image
By Eddir, with 4 replies.
Last reply by Eddir, almost 13 years ago:
Okay, thanks for your help.
How to write a line of code
By JasonZhu, with 5 replies.
Last reply by JasonZhu, almost 13 years ago:
Oh! This works to keep the game continually running after the world is set. I was going to ask how to do keep the scenario running after the world is set because how I was previously setting the world, it failed to run the scenario after it set the world.
Removing objects
By Draymothisk, with 8 replies.
Last reply by JasonZhu, almost 13 years ago:
Its read for each Object obj in getWorld().getObjects(Tree.class) then...
737
738
739
740
741
742
743
X