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
Where do I get the main class?
By joandvgv, with 6 replies.
Last reply by joandvgv, over 10 years ago:
Ok then, I'll try that. Seems like it's going to work, because the other tool (Jar2Exe) got the main class inmedeately when I upload the .jar
Help with bullet rotation after shot....
By Hnkzx, with 9 replies.
Last reply by danpost, over 10 years ago:
You did not do the final step as far as what I suggested you do (you are missing the follow-up to lines 24 and 25).
danpost wrote...
First, remove lines 5 and 6 from the Bullet class code. Then replace line 24 of the Rocket class with the following: <Code Omitted>By splitting up the line you had, we now have a reference to the bullet in the 'bullet' variable.
Now, follow that with the following
line: <Code Omitted>And you are done (at least with the rotation of the bull
Is there anyway I can get my project's classpath?
By joandvgv, with 1 reply.
Replied to by danpost, over 10 years ago:
Wikipedia has a page on 'Classpath -- (Java)' (or something like that).
Hearthstone Clone - How to Add Images?
By ProfessionalNoob, with 2 replies.
Last reply by danpost, over 10 years ago:
Chances are you will be moving or removing the image after some time. Hence, drawing the image on the background of the world would not be advisable. Create a 'Card' class (have it extend the Actor class); create an instance of the class and set the image to the object; then, add the object (actor/card instance) into the world at the desired location.
Help with steganography
By PCMasterRace, with 1 reply.
Replied to by danpost, over 10 years ago:
Refer to these places: (1)
Steganography
(2)
Normalization
(3)
Bitwise and Bit Shift Operators
Background Music Help?
By shooterbooth, with 1 reply.
Replied to by danpost, over 10 years ago:
In order to be able to check to see if the sound is still playing or not, you need to create a GreenfootSound object. Using the Greenfoot class method 'playSound' does not give you the capability to control or make checks on the sound. After creating the object, use the GreenfootSound methods to control and check it (refer to its documentation).
getScore() not getting get?
By primepanda1, with 2 replies.
Last reply by danpost, over 10 years ago:
primepanda1 wrote...
I had it where the counter was in the "Governor" class, but that didn't work because each governor had it's own counter, so I made the "Eating" class have one counter that all the "Governors" can reach, but unfortunately it is not.
Moving the counter to the Eating class does not change the fact that each instance (whether created from the class the counter is in or created from one of its subclasses) will have its own counter. Remember, an instance of a subclass is still an instance of its superclasses (all the way back to the Object class which is a superclass for
Zombie problem
By Corrupted, with 13 replies.
Last reply by danpost, over 10 years ago:
First problem I see is that you have three different lines in the wrld class that have 'new Player()' in them. Each time you use that, you create a new Player instance. So, you create one and assign it to the field 'ma'; then you create another and add that one to the world; then you take the counter that belongs to the one that is not in the world and add it into the world; finally, each time you use the method 'getPlayer' you get a NEW Player instance that was just created and had no chance of being added into the world, yet. Only use 'new Player()' once, assigning it to the field, then u
Help starting next wave of enemies
By DarkGhost, with 6 replies.
Last reply by DarkGhost, over 10 years ago:
Awesome that works brilliantly! Thank you so much for your help! :D
How do I start movement after some seconds?
By joandvgv, with 3 replies.
Last reply by joandvgv, over 10 years ago:
Yes! Thank you. This did work. In my implementation I had to use a switch for 'switching' between different deleays depending on the routes. I'm creating other discussion because I need help now with other trouble and the getIntersectingObjetcs method.
How to make a clock hand
By efe, with 16 replies.
Last reply by danpost, over 10 years ago:
efe wrote...
I guess the problem is that the main extension in the graphic is in y direction (bottom to top) whereas the main extension in yours is in x direction (left to right).
That makes sense. You would then need to create an image with double the height (instead of the width) of the original image and draw the original image at (0, 0) on the new double-sized image (presuming the hand points upward to begin with).
how to use a worlds started() and stopped()
By fejfo, with 6 replies.
Last reply by danpost, over 10 years ago:
Again, you can not create or delete any files or folders, nor can you write to any files on the site due to security restraints.
Dedect collision with class and subclass
By leuveg, with 6 replies.
Last reply by joandvgv, over 10 years ago:
davmac wrote...
I think this works but does something completely different to what you want. You want it to "getOneInterectingObject" from the superclass and the subclasses. But I think it just get you the ones from the superclass.
That's not right, it will get all instances of the given class (including instances of subclasses).
Ok, thanks for the clarification.
maze-walkers "Missing Methods"
By plant, with 17 replies.
Last reply by DoctorMitch, over 10 years ago:
plant wrote...
So does your player automatically move or do you have to move it
You move it with the arrow keys, seen via act. The set of 90 degree turns on either side of the move(1) keep the character facing the same direction at all times, and prevent the character from constantly turning left when pressing up, or right when down
Actors communicating with a World subclass
By forteddyt, with 3 replies.
Last reply by leuveg, over 10 years ago:
<edit> wrong thread
595
596
597
598
599
600
601
X