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
Higer resolution?
By -nic-, with 4 replies.
Last reply by -nic-, over 13 years ago:
sorry im linux /android :D
Removing an object that is a certain size?
By MoneyFishSlap, with 15 replies.
Last reply by SPower, over 13 years ago:
<Code Omitted>
Subclasses and Methods
By Razzo, with 7 replies.
Last reply by davmac, over 13 years ago:
You could declare the act() method in the Enemy class as 'final', and have it perform whatever check you like before calling another method ("enemyAct()" or whatever you like to call it). <Code Omitted> Then subclasses can override the enemyAct method, but not the act method.
Help with Location
By CrazyCarl992, with 5 replies.
Last reply by danpost, over 13 years ago:
'getObjects(class)' is a World method that returns a List of Objects of the specified class. Since it is a World method, we must prefix it with 'getWorld()', which is an Actor method that returns the world that an actor is in. Since you are in the act (or a sub-method that it calls) in the badger class, it would be the world that the badger being netted is in. The prefix for 'getWorld()' in this case is understood (the 'this' keyword -- referring to the badger). Now that we have a list of 'truck' objects, we should make sure that the list is not empty. The 'isEmpty()' method of the List
Tutorial problem- How to Access from one object to another
By franman, with 2 replies.
Last reply by franman, over 13 years ago:
^Thank you it's kinda hard to see where you're missing when dealing with lots of words and when it was compiled w/o errors.
opperating with lists
By Mux, with 10 replies.
Last reply by Mux, over 13 years ago:
thanks for the information its much better to do the thing in your one line code thx there for
Passing variables
By tomduff5985, with 3 replies.
Last reply by danpost, over 13 years ago:
If you only have one fisherman in the world, then in the second actor's class, add the following method: <Code Omitted>
getMouseInfo() Problem with mouse out of the screen
By Mux, with 5 replies.
Last reply by danpost, over 13 years ago:
If you use <Code Omitted>the last line will always return 'null' as you already received the info in the 'if' statement and the info in Greenfoot was nullified. That is why something in the form of SPower's method needs to be used.
Inputting string
By roronoa, with 1 reply.
Replied to by SPower, over 13 years ago:
<Code Omitted>
Floating platform
By Stephon231, with 2 replies.
Last reply by Upupzealot, over 13 years ago:
the problem may be the “getX()” method actually return the position of the platform, not the“actor”
Help please
By Stephon231, with 4 replies.
Last reply by Upupzealot, over 13 years ago:
@Builderboy2005 OK, you win :D
what's the use of the method "intersrcts(Actor other)" in the Actor class
By Upupzealot, with 1 reply.
Replied to by Upupzealot, over 13 years ago:
never mind, I misunderstand intersect for interest... :(
Variable from world class to actor class
By roronoa, with 1 reply.
Replied to by danpost, over 13 years ago:
If the name of your sub-class of World was 'MyWorld', and the variable in the world was 'myVar', then in the actor class: <Code Omitted>Replacements: 'MyWorld' to the name of your sub-class of world 'int' to the variable type needed 'myVar' to the name of the variable in your sub-class of wo
Enemy attacking randomly
By CrazyGamer1122, with 2 replies.
Last reply by CrazyGamer1122, over 13 years ago:
thank you, i will add your suggestions to the code and see what happens :)
storage.csv
By mark.hayes, with 2 replies.
Last reply by danpost, over 13 years ago:
Yes. UserInfo.isStorageAvailable() only checks to ensure that the user is logged in (if the user is not signed on, then storage will not be available). Locally, if you set the preferred user to an empty string (blank), the method would then return 'false'. It is best not to mess with the 'storage.csv' file (treat it as read-only). You can, however, just delete the file, and have a new one created from within the scenario by way of the 'store()' call (for testing purposes).
934
935
936
937
938
939
940
X