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
Sprite
By destroyer9909, with no replies.
Does anyone know where to download a cartoon shooter walking animation picture by picture sprite? All i came across was that you have to pay for it does anyone have for free?
Restarting current level
By Paul12345, with 2 replies.
Last reply by Paul12345, over 8 years ago:
Thank you very much !
cheat code
By destroyer9909, with 22 replies.
Last reply by danpost, over 8 years ago:
destroyer9909 wrote...
it still doesnt work
You placed your line 5 incorrectly. It is not a field, but a local variable. Move it, without the access modifier, into the act method (as first line).
Creating ScoreCounter
By Fizzy, with 3 replies.
Last reply by danpost, over 8 years ago:
Fizzy wrote...
I tried many things, but the problem was, I had no act() but Score() in code.
The Score class does not require an act method. There is nothing it will do on its own -- only when the score is actually changing (which is completely taken care of in the 'addScore' method.
Wrong method behavior
By ImAndrew, with 4 replies.
Last reply by CxVercility, over 8 years ago:
Your code is super confusing Why is it called Hero.getAttacked when he is the one attacking lol Also, shouldn't dx/dy be smaller than your max attack range? Besides that, as Dan already said you need a reference to the enemy being attacked to do something on that object only. One way would be to use a method in the enemy class that checks if the projectile hits them and then do something
Displaying text for a story game.
By Shadow, with 1 reply.
Replied to by danpost, over 8 years ago:
You cannot be the Shadow, because "The Shadow knows." LOL By keeping the text and the message board separate, it is easy to change the text. The text can be an Actor object that is assigned various GreenfootImage objects containing the appropriate texts at the appropriate times.
Coming back to java
By wabuilderman, with 3 replies.
Last reply by danpost, over 8 years ago:
wabuilderman wrote...
Yep... forgot the 1 in there... XD Funny how much one character can affect meaning....
One character can change everything (especially with coding).
Keep actors
By Chepaci, with 4 replies.
Last reply by Chepaci, over 8 years ago:
oh, i don't know what i did, but it keeps everything thx bro.
Please help!
By agray11202, with 5 replies.
Last reply by xbLank, over 8 years ago:
Line 13: 35 and 765 is refering to the range in which the mobs should spawn (on the y axis) in the world (my world is 1000x800 cells big). 999 (on the y axis) basically means that they should spawn on the very right end of my world.
[RELEASE] Implementation of Cheat Codes in your Project
By xbLank, with 2 replies.
Last reply by xbLank, over 8 years ago:
line 30: Should be "easteregg" ofcourse since we are calling lowercase.
CxVercility wrote...
You might not want to let this run in the background indefinitely, and entering it once should disable it after shouldn't it? Solid else.
Actually It is just running while you are in the main menu of your game. Besides this is just a sample. Ofcourse people can choose whether or not they want to let this run the whole time. In case you are planning to only implement one cheat code then ofcourse you can disable it after entering it once else that wouldnt make much sense. In the string check
Need Vector help!!!!
By johnguirgis, with 2 replies.
Last reply by danpost, over 8 years ago:
A vector has a direction and a length. If you need to ADD a horizontal vector to it, use the 'addVector' method (or whatever method there is that adds a vector force to the current vector. If you need to remove any currently set vertical force, then you would need to determine that part of the vector and subtract that force from the vector. Cannot provide any more details without knowing exactly what you are trying to do and without knowing what your Vector class is capable of (show the entire class code).
High score System
By Dimak, with 38 replies.
Last reply by Dimak, over 8 years ago:
Okay yep that works now. Thanks everyone for the help. ( I would not have passed this class without you guys )
Change world level when I reach a certain score
By nojamo66, with 2 replies.
Last reply by nojamo66, over 8 years ago:
Sorry about that I’m just a newbie at java so I wasn’t sure what to do now I solved it.
일리아스 wrote...
I do not really understand the problem to be honest. What are you failing at? You didn't even show us what you have tried so far. Its like you want us to do all the work.
Save a variable in a World and use it in another one
By alexlohe25, with 2 replies.
Last reply by xbLank, over 8 years ago:
We had this question at least 5 times in the past 2 weeks. Please use google.
Going from a subclass to another
By RipplyPear, with 2 replies.
Last reply by danpost, over 8 years ago:
The variables 'number' and 'number2' are set to zero from the get-go. They are assigned their value by way of the 'getObjects/size' calls before any of the actors are placed into the world. Either set their values at the end of the 'prepare' metthod or in the constructor after the call to the 'prepare' method.
296
297
298
299
300
301
302
X