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
Letter game constructor confusion
By chris4800, with 2 replies.
Last reply by chris4800, almost 13 years ago:
That's it! Thank you for explaining that. It seems so obvious now haha. Thanks again. It is much appreciated!
Someone help me fix this problem
By 2patrickMurphy, with 7 replies.
Last reply by 2patrickMurphy, almost 13 years ago:
ok thanks thats a much easier fix and ill make all nessciary corrections later when we combine our pieces.
...what am I doing wrong? :(
By Omniscience, with 18 replies.
Last reply by danpost, almost 13 years ago:
One thing is: you are storing the possible submitted responses in String variables, and then trying to ask if they hold a value of 'true'. Another thing: you are using 'Greenfoot.isKeyDown(String key)' to catch the response; using 'Greenfoot.getKey()' would be more appropriate in this case. One other thing (and I hope and pray that this is not what it looks like): the first line is not in a method, is it? (it should be a world variable -- and possibly static). Anyways, for getting the keystrokes:
how to make menu in the beginning of the game?
By snow13, with 2 replies.
Last reply by Builderboy2005, almost 13 years ago:
Alternatively, it might be easier to create an entirely different world that you can switch into. This can make pausing a bit easier, since if you stayed in the same world, you would need methods in all the objects to support pausing.
range
By tylers, with 3 replies.
Last reply by danpost, almost 13 years ago:
You will need to track two things within the for loop, that need to be initialized
before
the for loop. One to hold to closest gun object found, so far ('closestGun'), and one to hold the closest distance of that gun object ('closeness'). As you go through the for loop, compare the distance of the current gun class object with 'closeness' and if it is closer than replace the values of both variables. When the for loop is done, 'closestGun' will contain the correct gun class object. Calculate the angle between 'this' and the 'closestGun' and pass that to the projectile object class c
AI Work
By cobblerschris, with 9 replies.
Last reply by cobblerschris, almost 13 years ago:
Hi i have emailed you.....
How to make sprite that move animatedly when the key is pressed down?
By snow13, with 5 replies.
Last reply by tylers, almost 13 years ago:
uploaded the source now
If One Statement is True
By RM6442, with 2 replies.
Last reply by RM6442, almost 13 years ago:
Never mind, I took a closer look at my code and found that this works <Code Omitted>
Fancy Collision Detection
By RedPhoneBooth, with 2 replies.
Last reply by RedPhoneBooth, almost 13 years ago:
yeah, I was considering doing that, but would that eventually lead to an unreasonable amount of actors? oh well, for my game I only really need the block one and then special ones like chests and bosses. Oh well, ill improvise
World/Class problem
By al_griff, with 11 replies.
Last reply by al_griff, almost 13 years ago:
Oh ok that makes a bit of sense. Thanks for that :)
Working with keyboard in greenfoot
By montseviyu, with 8 replies.
Last reply by Busch2207, almost 13 years ago:
What u mean then? Cause the method, I wrote checks, if the spacebar was repressed. (From not pressed to pressed)
ArrayList help
By 2patrickMurphy, with 3 replies.
Last reply by 2patrickMurphy, almost 13 years ago:
everything fixed. I needed to iterate through each element of my arraylist and apply the timeframe and the boolean variable
Help with calling variables in two different classes
By criscotheshiz, with 9 replies.
Last reply by xillius200, almost 13 years ago:
change getWorld().addObject(new Shot(this), getX(), getY()); setRotation(getRotation()); to Shot shot = new Shot(); getWorld.addObject(shot,getX(),getY()); shot.setRotation(getRotation()); that should fix problem
One object eating then recreating it in a different position.
By lgbrf, with 25 replies.
Last reply by lgbrf, almost 13 years ago:
yeah i figured it was 38, i recompile each time, and there was only the other add object in the populate(); so i removed that, still glitched??
Some objects appear "late"
By legX, with 2 replies.
Last reply by legX, almost 13 years ago:
Thank you very much for this (very quick) response ! It worked, although I had to precise 'Greenfoot.delay(1)'. I am working on a new version of my Othello, available soon !! (still a few hours...)
982
983
984
985
986
987
988
X