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
Randomly playing background music and resetting the position of world objects
By Parte, with 15 replies.
Last reply by Parte, almost 9 years ago:
danpost wrote...
I guess I forgot to start the music after setting the 'bgm' field in the 'play' method. Modify the method to this: <Code Omitted>
Thanks a lot!
Yet Another Score Counter!
By TheBluePhoenix, with 2 replies.
Last reply by TheBluePhoenix, almost 9 years ago:
@Super_Hippo Oh my god! Thank you so much! Love the Greenfoot community, so easy to ask for help and not be criticised for "Being a NOOB." Thanks so much.
The two sound problem. Help please
By bian2205, with 2 replies.
Last reply by bian2205, almost 9 years ago:
Thanks
Object Interaction Based on Image Size
By zmcclary1205, with 1 reply.
Replied to by danpost, almost 9 years ago:
I would like to first suggest not to have fields for the image and its width and height. These can be acquired on the fly. For example: <Code Omitted>That way, you are ensured to get the actual current values for it size and do not have to worry about keeping track of them (which you really are not doing; you are re-scaling the images, but not adjusting the value of the fields for their height and width.
actor walk
By Dayuyu, with 6 replies.
Last reply by Super_Hippo, almost 9 years ago:
getImage returns the current image and setImage sets a new image active (which would be returned next time getImage is used).
How do I get one object to follow another?
By TheMemeMan, with 1 reply.
Replied to by Super_Hippo, almost 9 years ago:
Well, right now, it it does not really switch to the other side. To let them turn to the player, you can use the 'turnTowards' method. To make it work, you need a reference to the player objects. And you need some rule to decide which player to follow if there are two. To stop them from overlapping, check for intersecting between zombies after they moved and then, move back if they moved on another zombie.
Need help with getting counter to work plz
By JWK3986, with 1 reply.
Replied to by Super_Hippo, almost 9 years ago:
Show what you have tried.
need help! Greenfoot 3.5
By johnnysins, with no replies.
I 100% need help doing this! You are the pilot of a plane that has been sent out to pick up barrels that have fallen off a cargo ship. By flying over a barrel you will automatically collect it. The problem is that sea is rough and the barrels keep going under the water, so you have to collect them when they are at the surface. To make matters worse the area is a rocket testing site for rockets from NASA and they are unable to stop these being fired into the same area that you are in! You are going to program the above game. The plane will always be moving but we can control its left and right turning. Flying over a barrel will mean you collect it and search for the next one. Collecting a barrel will give us a score point. The barrel will randomly appear on the screen, but only stay for a set amount of time and then go under and re-appear randomly elsewhere on the screen. The rockets will appear at the top of the screen then randomly move down the screen until they disappear off the map. You must not hit the rocket. It is estimated that you will be able to survive 3 direct rocket hits and then the game will be over. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners. 3 Open course scenario “JF_3_5_Practice_Start”. 12. Create a sub class of the World class called BarrelWorld with the dimensions 800 x 600. Use the scenario image wet-blue.jpg as the scenario image. 13. Create a subclass of Actor called Plane and use the image airplane1. 14. Create a subclass of Actor called Barrel and use the image Barrel. 15. Create a subclass of Actor called Rocket and use the image rocket1. 16. Add code to automatically add a Barrel to the top left. 17. Add code to add a Rocket to the top of the screen. This code will randomly generate the x-coordinate and set the y coordinate to 10. 18. Add code to automatically add the plane instance to the middle of the screen. 19. Add code to the Plane class to have it constantly move forward at a speed of 2 and turn left when the left arrow key is pressed or right when the right arrow key is pressed. It will turn 2 degrees.
actor problem
By Dayuyu, with no replies.
The coding in my game is when main actor touch M29 actor can insert another world... soalan29 is fine but soalanbos1 cannot insert the another world or because the picture not same.... i set all picture same except soalanbos1... i have many question all doing fine except soalanbos1.. <Code Omitted>
score problem
By Dayuyu, with 19 replies.
Last reply by danpost, almost 9 years ago:
Dayuyu wrote...
yes i have about 12question so the world that have question have 12....i name the world like Q - Q6 for level 1... and level 2 Q21 - Q29..
In your Background1 world class: <Code Omitted>Then, in your Background1 world constructor, add the following line: <Code Omitted>This will allow any of your Q classes o
Object jump
By nush99, with 2 replies.
Last reply by nush99, almost 9 years ago:
thank you so much!!
Call an object's method
By Aniveal, with 3 replies.
Last reply by Aniveal, almost 9 years ago:
Thanks for the replies! Adding the (Terrain) helped. @danpost: You are right, that's exactly what I wanted. I think I would have found that out after testing though ;)
Power up two adjacent bullets programming
By tisoc2009, with 5 replies.
Last reply by Super_Hippo, almost 9 years ago:
If you show your code, it will be easier for us to help you.
changing text size in world
By FaintingSatyr, with 1 reply.
Replied to by danpost, almost 9 years ago:
You cannot adjust the size of the text that 'showText' uses. You can have the keys place its keyboard key value on themselves within the constructor of the Key class. There, you can create an image with text of any size and draw it onto the image of the key. You would be creating an object of and using methods of the GreenfootImage class (see documentation).
Help With mouseClicked
By AAkira, with 8 replies.
Last reply by danpost, almost 9 years ago:
Okay, that eliminates one possibility. Now, post your entire Property class.
439
440
441
442
443
444
445
X