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
Checks
By Kryptonous, with 43 replies.
Last reply by Kryptonous, almost 12 years ago:
Still figuring out the turns, but I think that'll work out, eventually. Thanks danpost and Super_Hippo, you really helped me out a lot! I still have to learn so much, though!
Many, many thanks!
How to filter out the "Enter" character form a txt read?
By EnderPicture, with 1 reply.
Replied to by Super_Hippo, almost 12 years ago:
Could you post the relevant code how you read the file? Maybe we can find the reason then. (Use code tags please.)
Setting movement of an object
By ryancumpsty, with 1 reply.
Replied to by danpost, almost 12 years ago:
Please refer to
this page
of the java tutorials.
Movement!
By gamer98, with 4 replies.
Last reply by -nic-, almost 12 years ago:
Yeah I know but I copied it from a test scenario and it threw an error otherwise forgot to get rid off it. Thanks Super_Hippo
Wombat Scenarion help !!!
By KOSIUS, with 1 reply.
Replied to by danpost, almost 12 years ago:
Although the wombat is not an enemy,
this
still might help. It is the same type of movement.
How to check actor compatibility?
By Stoeptegel, with 1 reply.
Replied to by danpost, almost 12 years ago:
Line 5 uses 'getOneObjectAtOffset'. The documentation shows that it returns an object of type Actor (regardless of what class of object you are looking for). To access anything in the Container class with the field 'containerPicked', you need to let it be known that the field holds a Container type object. <Code Omitted>This line takes the actor (containerPicked) and casts it as a Container type object and then sets the new variable 'cp', which is declared to hold a Container object, to that actor.
Constructor booleans do not work properly.
By Stoeptegel, with 2 replies.
Last reply by Stoeptegel, almost 12 years ago:
Ah! I almost forgot about switch cases *shame*. Thanks mate! Much improvement :)
Error: n must be positive
By Pe1per, with 7 replies.
Last reply by davmac, almost 12 years ago:
Super_Hippo wrote...
How is 350-250= -100?
Hmm, you're right. I mis-read that code (as 250 - 350). However, the 'n must be positive' error nearly always comes from mis-use of the Greenfoot.getRandomNumber method, in my experience (and it certainly doesn't come from addObject). Pe1per, perhaps you can point out which line actually causes the error rather than forcing us to guess?
Press a button while Game is over problem?
By AnthonioBanderas, with 1 reply.
Replied to by Super_Hippo, almost 12 years ago:
Are only enemies moving? I think I didn't really get the way the game works right now. You get points for every click on an enemy and you have to place them back until one reaches the right side? Could it be that the seeLocation method (which I don't really understand why it is made like this) is quite useless? It is only called when it was dragged to a different position and if it is on a target position, it shouldn't move. How is this supposed to be? You could do it like that:
I dont want to press 2 buttons at a time
By Moho, with 3 replies.
Last reply by danpost, almost 12 years ago:
For continuous: <Code Omitted>
trail following player
By Moho, with 1 reply.
Replied to by danpost, almost 12 years ago:
<Code Omitted>or <Code Omitted>
Need Help ASAP
By n1nikko, with 1 reply.
Replied to by Super_Hippo, almost 12 years ago:
Use the code tags to post code please. What I would suggest first, because this code is a mess (and it isn't easy to get an overview of what is important and what not), have the images in arrays. Then you can code that in a few lines and don't have to do something like what you did there.
Is this code correct for having an enemy moving left to right in my maze?
By pingster, with 2 replies.
Last reply by pingster, almost 12 years ago:
Firstly thanks for the reply . Could you possibly give me a suggestion of what the code in line 3 and 6 needs to be?
Help With My 'Game Over' after HealthBar is Empty
By Manda_x, with 4 replies.
Last reply by Manda_x, almost 12 years ago:
thanks its works now, you've been a great help to my game.
Array Problems
By xJesterPROx, with 7 replies.
Last reply by xJesterPROx, almost 12 years ago:
In your second Demo, can you explain to me how the tail knows how to follow the head? I would post the code that covers things like direction and spawning the tail is almost the entire snake class.
608
609
610
611
612
613
614
X