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
Referencing a Non-Static Method from a Static Context
By Ed.Betteridge, with 3 replies.
Last reply by danpost, about 13 years ago:
You would need to add a method to the Display class to alter the image and have a reference to the Display object to call the method on.
Das Ende der Welt...
By Aceman, with 2 replies.
Last reply by Aceman, about 13 years ago:
Jaa ich war nur nicht ganz so motiverit alles auf Englisch zu schreiben ^^ Danke schöön :)
Reading one number from a string (array?)
By askgriff, with 7 replies.
Last reply by askgriff, about 13 years ago:
OH! Duh. Thank you. Wow... LOL Of course.
Help with objects follow each other.
By 13111876, with 2 replies.
Last reply by 13111876, about 13 years ago:
@davmac first of all thanks for the reply it helped me a lot. But now I want to have also the list of dier(animal) in the same code. I did something like this.
Spawning help
By Baenefin, with no replies.
Hello all, I am trying to add a new object to the world by getting the X and Y from another object. I would like to spawn a heart if my enemy dies. Alice can kill an enemy by jumping on it. So when alice kills an enemy Alice should spawn another enemy? <Code Omitted>
Need an object fixed to the screen, not the map.
By Tavi, with 48 replies.
Last reply by Tavi, about 13 years ago:
Again, no camera movement.. and the new camera up method makes the game extremely buggy.. :( if i jump i jump an entire floor.. ( wayyy to high) and the new walk method freezes the entire camera! I'm hoping you could help me out in a more personal matter, else it might take a very long time.. I've sent a short email to the gmail adress on your account :) .. hopefully we can resolve this issue, I Will post the entire game early next week.
Space invaders enemy AI
By benskii93, with 3 replies.
Last reply by benskii93, about 13 years ago:
This is all good information, its given me some good ideas, thanks a lot both of you.
Greeps?
By mauz.asghar, with 3 replies.
Last reply by Bryan123, about 13 years ago:
Ya mauz holy. This stuff isnt for the public
my problem in source code is illegal character:\8211.what is that?im not understand about this
By fiki, with 1 reply.
Replied to by mjrb4, about 13 years ago:
8211 is an alternative dash (-) symbol in a different character set, where I have seen this message it's where people have copied code off a site that doesn't use the correct ascii based dash symbol, and thus causes issues. Have a look through your code and re-type any dashes (the error should give you the line number the suspect character is on which will make this much easier.)
Life system isn't working
By sihaco, with no replies.
I have a class Tumbler and a subclass of Tumbler called Life. The Tumbler has a public field called lifes which is initially equal to 3. When the Tubmler hits an object of the class Car, the field lifes should decreased with one (lifes = lifes - 1). In the class Life (subclass of Tumbler) I have code to remove one object of Life (which is a heart symbol). The problem is, instead of doing lifes = lifes - 1 (so the first time, it should be 3 - 1 = 2) lifes gets a value of -185. This is the code for the method when the Tumbler hits a Car: <Code Omitted> And this is the code for Life: <Code Omitted> Both methods are called from the act method. What's the problem? It should simply just do life - 1, instead of making the value of life equal to -100 +.
Piggie change direction
By ddvink, with 2 replies.
Last reply by danpost, about 13 years ago:
The 'checkFloor' method only lets you know if you are on an end floor; but does not let you know which end. So, your actor needs more information to determine which way to go. The simple solution is to ask whether the x location of the actor is greater than or less than half the width of the world. <Code Omitted>I may have '1' and '2' arranged incorrectly; but, the main idea should be apparent.
Starting at a random interval
By Baenefin, with 4 replies.
Last reply by danpost, about 13 years ago:
I guess you could change 'if (j >= 250)' to something like 'if (j >= 225+Greenfoot.getRandomNumber(50))' to vary the intervals.
Animation stays behind char
By ddvink, with no replies.
Dear all, I have a game where I control a character. When the character levels an object is called from a levelup class where an animation takes place. This animation is about twenty images. Everything looks ok, but when the char levels and walks on, the animation stays behind. Is there a way to move that animation with the character? Yours, Dennis
to end a game
By sophiefordream, with 2 replies.
Last reply by danpost, about 13 years ago:
In the world class, you can use 'getObjects(null).isEmpty()' to see if no actors are in the world. For a specific set of actors, you will need to combine them like this 'getObjects(Butterfly.class).isEmpty && getObjects(Elephant.class).isEmpty() && /* etc */'.
my program stop
By sophiefordream, with 7 replies.
Last reply by sophiefordream, about 13 years ago:
thanks.....^^
778
779
780
781
782
783
784
X