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
Oops. to not look too foolish about adding classes.
By 5mark7, with 2 replies.
Last reply by miningmanna, over 11 years ago:
rekt
How to add separate classes.
By 5mark7, with 2 replies.
Last reply by 5mark7, over 11 years ago:
thanks Dan. And, I have some other good news for myself. It looks very favorable that my little high school is going to re-instate my computer programming class. So, I will definitely be around with more questions as I keep learning this thing. have a great day mark.
Reducing health
By vampire-wannabe, with 1 reply.
Replied to by danpost, over 11 years ago:
In line 29, you are using 'fireWorld' as if it was a previously defined variable -- which is is not (not in the method, the class, or any class this class extends). If you are trying to set the 'volcano' variable to the world object on that line, then it is too late as you just remove the actor from the world. Any way of getting a reference to the world has been eliminated. If you switch lines 28 and 29, you can get the reference before you remove the actor from the world; however, using 'fireWorld' will still fail -- use 'getWorld()' instead. There is another issue with the 'aangGone' m
Help: trouble Using get One Object At Offset to move a character along a set of tiles
By Kami_Uizado, with 4 replies.
Last reply by danpost, over 11 years ago:
Sorry. I was mistaken in the above. The check on line 10 limits the number of tiles that could be detected to two -- which will not work. The other tile detected will be the tile that the character is current at. If you import java.util.List into the class you can replace my lines 10 through 12 above with the following:
Having trouble with my platform game
By mcyr116, with 2 replies.
Last reply by mcyr116, over 11 years ago:
Thank you soooo much! I was close on my own, but just couldn't get there!
Exercise 8.32 in textbook
By rgilmet, with 4 replies.
Last reply by rgilmet, over 11 years ago:
Thanks so much for your help.
Help with drawOval
By Buddha, with 3 replies.
Last reply by danpost, over 11 years ago:
I was suggesting something like this: <Code Omitted>
Access variables defined in world in and actor. Is this possible?
By ChiefCrunchy0, with 2 replies.
Last reply by ChiefCrunchy0, over 11 years ago:
Thank you danpost, this solved my problem!
Don't know how to use a method
By worldmaker, with 3 replies.
Last reply by Super_Hippo, over 11 years ago:
If you want to pause the whole scenario, you can use 'Greenfoot.delay(200);'. This will be like 3-4 seconds with the speed slider in the middle.
A little help with intersects() method
By NoValidIdea, with 2 replies.
Last reply by NoValidIdea, over 11 years ago:
Thanks. The reference soulution is way better...
Need help with the Records
By Oxcar, with 1 reply.
Replied to by danpost, over 11 years ago:
If you are referring to your 'Bee' scenario, it seems okay to me. It is also showing your score of '40'.
World Creation Question
By Gingervitis, with 3 replies.
Last reply by danpost, over 11 years ago:
I think my
Use of 'this' demo
may be something for you to look at. Basically, what the scenario demonstrates, as far as world changing, is that you can create all your portal pairs and place them each in their respective worlds right at start-up. Randomly placing the portals in their worlds will not effect their capabilities and they can be made to be one-way, circular (back and forth), or chained (one to the next). Also, when used, the receiving portal can remain (as I have it in the demo), be relocated, or even removed. If you have an
Need help with changing color of text
By acampbell24, with 7 replies.
Last reply by danpost, over 11 years ago:
You could get a MouseInfo object if 'mouseClicked(null)' and then see if 'getActor', if not null, returns an actor of said type. However, I would just keep references to all three colonist objects in the world class and check for clicks on each one in its act method:
Very confused Please assist
By ipeefreely, with 3 replies.
Last reply by danpost, over 11 years ago:
There are other problems as well -- but, the main one is where you are putting the code. It should not be in the Animal class, but in your World subclass and called from the constructor of that class. Also, a better name for the method might be 'addObjects' (plural), since it adds multiple actors into the world:
Having a major problem with my game code, please help.
By Raisoren, with 5 replies.
Last reply by Raisoren, over 11 years ago:
UPDATE: The problem has been fixed, thanks all for replying. There was an extra letter in the "Level" subclass that didn't belong. Sorted now.
562
563
564
565
566
567
568
X