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
Create text
By LarsisYoloo, with 1 reply.
Replied to by danpost, over 8 years ago:
You do not "go to a class". A class is some code that describes an object (it describes an instance of the class). You might have one Actor object go to some other Actor object within your World object. I am not trying to be difficult; just trying to give you pointers on how to get your problem across without confusion. The word "balloon" is ambiguous as well. I think, now, that you mean "bubble text" -- as if someone says something (like you see in a comic strip). Even though I replaced my previous post here, it is basically what I had written. You would draw the text image onto the "b
Re-using / Saving variables after resetting the game
By Moritz1508, with 1 reply.
Replied to by danpost, over 8 years ago:
Moritz1508 wrote...
I'm wondering if it is possible to keep the value of specific variables after a reset.
Use a class variable instead of an instance variable. Just add the 'static' modifier to the declaration line of the field. For example: <Code Omitted>The first line shows an instance field. Any object that is considered to be of the type represented by the class will get its own field with the name given. These fields
Gamepad errors
By DingDingo, with no replies.
I'm trying to add controller compatibility to my project but everything downloadable from
the greenfoot gamepads section
seems to be outdated. I'm prompted to update the code and either way I get a ton of errors all similar to this. <Image Omitted> Is there a more up to date version out there or is there another way to add controllers to Greenfoot? I've been considering doing something with getKey() but I'd rather not if there's a better way to do things.
Unknown Cause for Tree changing
By hosfeldli, with 32 replies.
Last reply by hosfeldli, over 8 years ago:
Ahhh thank you.
Need help on bacteria wbc4 chapter 5 green foot
By bbishal, with 5 replies.
Last reply by danpost, over 8 years ago:
I will presume that Bloodstream is your subclass of World. You can use the following line to access it: <Code Omitted>The you can call the methods on 'bloodstream.
Need help for my movement code
By Kolyma, with 12 replies.
Last reply by PeterMuller, over 8 years ago:
Greenfoot is trash , it always crash Your tweeter Peter
Greenfoot is trash , it always crash
By PeterMuller, with no replies.
Your tweeter Peter
How to get enemy to follow object and attack it?
By IlikeThePrequels, with 3 replies.
Last reply by danpost, over 8 years ago:
Please be more detailed. Give speed, direction relative to object, how far off object is missed, etc. -- especially code used.
Projectiles give errors when at the edge of the world
By Soulcrusher13, with 5 replies.
Last reply by danpost, over 8 years ago:
You will need either the 'else' or the 'return;' statements (at least the first one). I do not see how line 13 would have caused the error you were getting. The act method will not execute for an actor not in a world and there is nothing that will remove it before that line.
Collision and counter
By hosfeldli, with 4 replies.
Last reply by hosfeldli, over 8 years ago:
thank you very much that works perfect.
Touching actors with mouse
By Chepaci, with 4 replies.
Last reply by danpost, over 8 years ago:
You could put something like this in your World subclass act method: <Code Omitted>
Hilfe (german)
By Janny221199, with 5 replies.
Last reply by Vercility, over 8 years ago:
Super_Hippo wrote...
Discord nutze ich, weiß aber nicht, inwieweit es von Vorteil sein würde gegenüber der Webseite hier. (Voice-Chats werde ich nicht nutzen.)
ist schneller meistens, ich schau auch nur abundzu auf greenfoot vorbei, bin aber den ganzen am pc also antworte ich auch innerhalb von ein paar sekunden :P
Problem with changing the image of a text
By HardToFindAName, with 1 reply.
Replied to by danpost, over 8 years ago:
You are creating an alternate world instance with the first line. You want the score from the real world. Use this for the first line <Code Omitted>Also, the code given must be executed while the actor is in the world. So, move it from the constructor -- override the 'addedToWorld(World)' method of the Actor class and add the code in it: <Code Omitted>
How to make a list of objects referring to the superclass?
By HardToFindAName, with 2 replies.
Last reply by HardToFindAName, over 8 years ago:
danpost wrote...
Use the following: <Code Omitted>
Thank you very much! It worked great! I have another question if you wouldn't mind helping me: https://www.greenfoot.org/topics/60449/0#post_124333
Please help me in method[]in class greenfoot cannot be applied to different types
By MonkaOmega42, with 2 replies.
Last reply by MonkaOmega42, over 8 years ago:
Thank you very much! :)
283
284
285
286
287
288
289
X