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
Score
By puddle148, with 15 replies.
Last reply by danpost, almost 10 years ago:
puddle148 wrote...
danpost whenever i take the static context off of the counters the PlayerScore and dealerScore get errors saying non static cant be referenced from static context.
Alright. I guess you can keep the Counter object fields, only those containing Counter objects, as static fields; but, I suggest that you assign their objects in your world constructor -- not in their line of declaration.
need help some of my actors wont spawn wont spawn after i hit restart
By jrod159, with 4 replies.
Last reply by jrod159, almost 10 years ago:
yes the static fields were the problem, works fine now thank you for your help :)
Discussion
By vivanbre000, with 1 reply.
Replied to by TheWeeg, almost 10 years ago:
Good morning
incompatible types: java.lang.Object cannot be converted to greenfoot.Actor
By MrsWarren, with 1 reply.
Replied to by danpost, almost 10 years ago:
Please show the code of the subclass that extends the Animal class that is producing this error.
HELP ! confused on error message
By rnb262, with 1 reply.
Replied to by danpost, almost 10 years ago:
You have the class ending right after the act method. Everything else below needs to be moved up inside the class.
Why only last command works
By Marrryanx, with 1 reply.
Replied to by danpost, almost 10 years ago:
Because all possibilities are covered by the first two condition (either the first one is true or, if not, the second one must be true), the last two conditions are never a consideration. Either use the same button class for both buttons (with possibly different text) or disconnect the 'if's by removing the 'else' at line 11 and check which world the actor is in before asking about each button.
How can i get enemys to move but not go past a ceratin y co - ordinate
By jrod159, with 3 replies.
Last reply by jrod159, almost 10 years ago:
ok thanks for the help guys :)
theres no Button Compile all on my greenfoot
By novianty.ophy, with 13 replies.
Last reply by danpost, almost 10 years ago:
You have shown part of a subclass of Actor. I asked for you to show ALL codes you have created (meaning entire class codes of ALL subclasses of World and Actor. I do not know if you even have a subclass of World, which is required, yet.
Bouncing Ball
By KyrenD2, with 3 replies.
Last reply by Super_Hippo, almost 10 years ago:
Oh yes, you are right, thank you. I probably missed that because I have never used that method myself... or because the method in the Animal class is named atWorldEdge.
Sounds
By Solomon, with 2 replies.
Last reply by Nosson1459, almost 10 years ago:
In play do:<Code Omitted>
cutting background images
By Alexlazea, with 5 replies.
Last reply by Alexlazea, almost 10 years ago:
I belive i still have a lot to learn, i understood your idea and i'm gonna apply it differently, made by myself, othervise i will not understant anything and not learn anything Thans for the ideea dude, you're awesome
Sound
By Solomon, with 1 reply.
Replied to by Super_Hippo, almost 10 years ago:
Try to use "dog.wav" instead of only "dog".
adding checkbox to a panel
By divinity, with 7 replies.
Last reply by divinity, almost 10 years ago:
thank danpost
Preventing collision of player with other classes
By wym, with 1 reply.
Replied to by danpost, almost 10 years ago:
If you mean you are trying to have the player stop when a tree is encountered (so that they do not intersect each other -- that kind of 'prevent collision'), then your Tree class should simply be this: <Code Omitted>and you should have the player that moves check for trees and stay off of them.
Adding object to world
By Solomon, with 1 reply.
Replied to by Super_Hippo, almost 10 years ago:
If this is in a world subclass, simply remove 'getWorld().'.
404
405
406
407
408
409
410
X