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
how to change value of variable when hits the edge
By Shadow7, with 1 reply.
Replied to by danpost, over 10 years ago:
Shadow7 wrote...
what i am trying to do is once this object reaches an edge it will multiply the value of the variable by -1
Line 3 in the code given is multiplying by positive one, not multiplying by negative one. You need the variable 'mv' to be maintained longer than during the single execution of the method; so, you need to move line 1 outside the method. This changes it from being a local variable to being an instance field which is maintained for as long the actor object exists.
Ech help me
By Toly, with 8 replies.
Last reply by Toly, over 10 years ago:
Thanks!
Gameover Screen Help Please
By SarahBeresford, with 3 replies.
Last reply by Super_Hippo, over 10 years ago:
Change line 16 to this: <Code Omitted> The act-method is only executed as long as the scenario is running. If you add an object and stop the scenario, its act-method won't be executed.
Level 2 World Confusion
By GreenMan15, with 13 replies.
Last reply by danpost, over 10 years ago:
GreenMan15 wrote...
Dan I just want to personally thank you for your help, it finally works! I couldn't believe I just had to put my method in just one World subclass.
Why not? You can create multiple subclasses of Actor and all of them can use any method within the Actor class. This is what is called inheritance. All non-private methods (and fields) in any class are a part of any of its subclasses (and subclasses of those subclasses, etc.).
KINECT PROBLEMS WINDOWS 10
By aaron1011, with 1 reply.
Replied to by aaron1011, over 10 years ago:
hi?
What code would I used to have an object (named Mito) eat another object (FishFoodPellets)?
By alexus2514, with 4 replies.
Last reply by DogeOverlord, over 10 years ago:
'actor' is a variable name. Leave that alone. You need to change 'clss' to 'FishFoodPellets.class', or whatever the name of the class is you are trying to eat.
Can someone help me make the particles bounce off the wall.
By RedPanda98, with 1 reply.
Replied to by danpost, over 10 years ago:
Look at line 53 closely. See what kind of object is tested for. See what you are trying to cast it to. See what type of field you are trying to assign it to.
Help ... Actor not in world... T_T
By ryvetra, with 12 replies.
Last reply by ryvetra, over 10 years ago:
i use the same super class ...
How do I get my ball to bounce off the sides of the screen and the paddles?
By tn13673, with 2 replies.
Last reply by tn13673, over 10 years ago:
I fixed everything, my teacher finally got around to helping me.
i just confused this question
By hmulu, with 1 reply.
Replied to by danpost, over 10 years ago:
hmulu wrote...
exercises 3.29 is this method static or not? what does that tell us?
The first question is just asking if the method is declared as being (or modified to be) a 'static' method. The second one basically asks you to provide a description of the state of the method with respect to the presence or absence of the 'static' modifier.
I need help!!!!
By luke6728, with 1 reply.
Replied to by davmac, over 10 years ago:
Uninstall your current version, and then install the new version.
Why my code is removing 2 objects first and then 1 by 1?
By heitorpereira, with 2 replies.
Last reply by danpost, over 10 years ago:
If you only want to remove one object, use 'removeObject' instead of 'removeObject
s
'. You may have to check to see if 'getObjects' returns a list that is not empty before extracting an element from it.
how can i get the smallest and largest number to give the right output
By divinity, with 11 replies.
Last reply by divinity, over 10 years ago:
hi danpost i want to thank you very much. i fix the problem and i see and understand what you were saying just now. thanks again. it giving me the correct output. thanks much. your help and patience is much appreciated
How to make a collection? D:
By Doggygaming, with 2 replies.
Last reply by Doggygaming, over 10 years ago:
thx friend :)
Song File too Large?
By WilliamSmith, with 1 reply.
Replied to by danpost, over 10 years ago:
Sometimes, converting the files to a different format can reduce the size. I understand mp3 files usually take up less file space.
487
488
489
490
491
492
493
X