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
Counter
By lozzi96, with 2 replies.
Last reply by Alwin_Gerrits, almost 11 years ago:
So prety much just add a counter and up it in your method that makes the point disappear. Then call that counter if you want to know how many points have been collected. If you want to ask how much the counters value is from another class just declare it as a public (so 'int counter' outside of any method but inside your class)(not really called public, but works the same) and use newVariable = point.countername. Then just print newVariable or whatever name you gave the variable you want to hold the score. You could allso just print point.countername (by the way, point is your classname for th
Next level if certain coordinates
By M_Slofstra, with 21 replies.
Last reply by M_Slofstra, almost 11 years ago:
Thanks for your help guys, I finally managed to upload the first version, after days without internet. This is the URL to my game: http://www.greenfoot.org/scenarios/12469 You're right, Alwin_Gerrits. But it's kinda strange that teachers won't help much, so I'm really happy that you guys exist :p
Changing Random Int to String
By xxPythonslayeRxx, with 5 replies.
Last reply by xxX_Muffin.man_Xxx, almost 11 years ago:
<Video Omitted> happy halloween
Enemy health wont work.
By Srax, with 4 replies.
Last reply by Srax, almost 11 years ago:
davmac wrote...
i don't really know how to fix that :(
The problem is that you can't call the atWorldEdge() method once the actor has been removed from the world. The way to fix it is to change your code so that it doesn't call the atWorldEdge() method if the actor has been removed from the world. :) There's a full explanation
here
. Many other people have experienced this problem. I suggest you try a search, in future, to see if others have encountered your problem and whether they found a solution. In t
Have enum classes and Actor classes in the same array?
By Entity1037, with 10 replies.
Last reply by danpost, almost 11 years ago:
Entity1037 wrote...
Oh! I didn't know Objects was a type you could use.
Just to clarify -- it is not 'Objects', but 'Object' as the name of the class.
Wait, it doesn't work if I put "Enemy.class" in the array.
An array of Object type will accept all values and objects (provided they are defined and referred to properly). I would think it goes without saying that 'void' is not a valid entry as all elements are 'null' (not 'void') to begin with.
Change order of objects (One over the other)
By HaselnuesseTo, with 6 replies.
Last reply by Super_Hippo, almost 11 years ago:
Alwin_Gerrits wrote...
The last thing you add is going to be on top. Because it is the last layer added to the world. Please correct if I'm wrong.
It's the other way around, the first class will be on top of the others, then the second and so on.
End of game audio/ scoreboard working on PC, but not Greenfoot website?
By Gish, with 15 replies.
Last reply by davmac, almost 11 years ago:
Yes, we are working on it. No, I do not know when it will be resolved. :)
Shooting delay
By Srax, with 6 replies.
Last reply by Srax, almost 11 years ago:
Okay, i'll try again, Thanks.
Where to download a stick man scenario
By cloud41910, with 2 replies.
Last reply by danpost, almost 11 years ago:
I did find one downloadable 'stickman' scenario here. I believe it was scenario 1017.
cannot find symbol add score problem
By coder04, with 1 reply.
Replied to by danpost, almost 11 years ago:
Not enough info. What is 'multiplayerspace', as far as being a variable/field? How is it defined?
Wave
By xoiam, with 3 replies.
Last reply by danpost, almost 11 years ago:
I came up with the following, where the frequency is around the number of cycles across a 600 pixel wide world: <Code Omitted>The first three lines can be instance fields instead of local variables (or even class constants, if desired).
Mouse info
By umeshtaware, with 2 replies.
Last reply by danpost, almost 11 years ago:
MouseInfo objects can give you any actor it may be on with the 'getActor' method; and the 'toString' method should work on that. However, the string given may not be quite what you are looking for. In that case, you need to show the code you are attempting to use, so we can get a better idea of how to help (if possible). Look below the content box for a link on how to post code.
Mouse movement
By Judscar922, with 5 replies.
Last reply by danpost, almost 11 years ago:
You can search through the methods found
here
for methods that return various states of the mouse and also to get a MouseInfo object. And, you can go
here
for the MousInfo class API to see what methods are available to use on a MouseInfo object..
Holding an actor
By RSGBROK, with 18 replies.
Last reply by Alwin_Gerrits, almost 11 years ago:
The idea for as far as i got it is that he wants the wolf to be netted, then move exactly like the net for 5 moves and then move on its own again. Allso i didn't say the code you posted would fix anything.
My health code seem to not work
By coder04, with 17 replies.
Last reply by coder04, almost 11 years ago:
thanx
636
637
638
639
640
641
642
X