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
Not updating position?
By ProfessionalNoob, with 12 replies.
Last reply by danpost, over 11 years ago:
How about positioning the cards with something like this: <Code Omitted>You should make sure that you will never have enough cards on the board to reach to right edge of the world or this will cause an infinite loop (the card being placed would not be able to more far enough right to NOT be still touching another; and therefore, the condition of the 'while' loop will never be false to exit the loop).
Run a method from another class?
By h123n, with 13 replies.
Last reply by danpost, over 11 years ago:
According to Wikipedia, I had it backwards; however, it does state that 'brackets' typically refer to different symbols depending on the geographic location of use. The only one it, as a standard, considers a 'brace' IS the curly bracket; and 'bracket' is a general term for all four sets of punctuation: (1) '( )' - round brackets or parentheses; (2) '??' - square brackets (cannot seem to show in this content pane); (3) '{ }' - curly brackets or braces; (4) '< >' - angle brackets or chevrons.
How to get distance to another class?
By EduandErnst, with 9 replies.
Last reply by danpost, over 11 years ago:
EduandErnst wrote...
What do you think about something like this? < Code Omitted >
I think you should use my code above for the character and then, in the class of the moving obstacle, have any player intersecting it move when it moves -- keeping things simple. I am presuming, however, that the obstacle will continue to move normally regardless of any interaction with the player (the obstacle pushes the player around). If you need help with the code for the class of the moving obstacle in this regard, post what movement code you have for it (and anything related to that movement)..
Loading in Actors and If touching Actor
By LamboCreeper, with 3 replies.
Last reply by danpost, over 11 years ago:
There is also an Actor class method 'intersects(Actor)' which you can use if you have a reference to the actor you are checking the intersection of. <Code Omitted>
Crashes every time I shoot the world border
By Salcrainia, with 5 replies.
Last reply by danpost, over 11 years ago:
Salcrainia wrote...
it still annoys me that something that simple is a game breaker :P
Well, I do not think that it is something that can be avoided that easily within the greenfoot framework; and a major part of programming involves taking into account every conceivable situation (making sure that all field and variable values are within proper limits before using them). This type of error messages usually means that this was not accomplished properly or you did not set up a field properly by not assigning a valid value to it to begin with.
Greeps Competition Question
By justdal, with 1 reply.
Replied to by danpost, over 11 years ago:
Rule 5. No long vision. You are allowed to look at the world only at the immediate location of the Greep. Greeps are almost blind, and cannot look any further. I believe what you have above constitutes looking at the immediate location and would therefore be allowed.
Add to counter when object gets removed
By GuilhermeGomes, with 2 replies.
Last reply by GuilhermeGomes, over 11 years ago:
I earlier forgot to write this <Code Omitted>. So how do i do it? I followed Joy of Code #28 guide so i tried to do the same has michael EDIT: IT WORKS NOW :D!!! only had to change to this <Code Omitted> thank you for your help!
Character animation in a scrolling World help!
By OwlyL, with 8 replies.
Last reply by OwlyL, over 11 years ago:
Thanks for your advices. I fixed the Bug per seperating the animation from scrolling. was more easier than I thought!
Take hp
By 0gener, with 2 replies.
Last reply by 0gener, over 11 years ago:
Thank you very much for the explanation and for the code, it´s now working.
Need help with draw features/dimensions
By shooterbooth, with 6 replies.
Last reply by shooterbooth, over 11 years ago:
Here's the code I ended up using in case anyone in the future ever comes across this post looking for a soccer field. It looks perfect and is for a world of 600 width and 400 height.
How do you get a bullet to shoot left help plz
By Linniah, with 3 replies.
Last reply by Linniah, over 11 years ago:
It work!!! Ty so much
How can I make a background out of 3 separate images?
By decadence18, with 1 reply.
Replied to by danpost, over 11 years ago:
The following constructor will draw three images onto the background image:
BlackJack
By drummerboy619, with 11 replies.
Last reply by danpost, over 11 years ago:
drummerboy619 wrote...
But I need to keep the values and information about the cards from lines 21 to 201 correct?
All the information on those lines has already been taken care of in the constructor of the class I gave. The fields 'suit', 'face' and 'value' will be set to the appropriate values when the card is created. They will hold, for an example, when 'new Card(11)' is executed: id = 11; suit = "club"; face = "queen"; value = 10; and the 'front' field will hold the face up image for that card; the 'back' field holds the face down image for ALL the cards (you may need to adjust
Error: 'Reached End Of File While Parsing'
By LamboCreeper, with 1 reply.
Replied to by lordhershey, over 11 years ago:
you are missing a '}' character - it should be on line 11.
How to remove my arrow?
By GuilhermeGomes, with 4 replies.
Last reply by GuilhermeGomes, over 11 years ago:
You're right thank you! I'll upload my game as soon as i get it done
586
587
588
589
590
591
592
X