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
[Help]How to make Standby and move a object with animation
By fayde, with 5 replies.
Last reply by fayde, almost 13 years ago:
Sorry :(
reading and displaying information
By dimas_ant, with 5 replies.
Last reply by dimas_ant, almost 13 years ago:
thank you so much, I could do if you want to place a button is click on a certain object how to do?
my gaming scenario is having lag or low on fps suddenly
By javanoob, with 3 replies.
Last reply by javanoob, almost 13 years ago:
nvm i fixed it XD . it was all the background program i had while i was running greenfoot but thx btw XD
Shaped image drawing
By Zamoht, with 7 replies.
Last reply by Zamoht, almost 13 years ago:
I found
this
great answer on stackoverflow and rewrote it a little for Greenfoot.
Create a grid that outlines squares where objects can be placed?
By Entity1037, with 6 replies.
Last reply by Entity1037, almost 13 years ago:
Nevermind, I got it! ScrollingX and ScrollingY were the same thing as xcorrect and ycorrect.
help with AI
By manish123, with 3 replies.
Last reply by danpost, almost 13 years ago:
You give the class of the object to return. So, instead of 'boolean', you would use 'Points'. And instead of returning 'true' or 'false', you would return a Points object or 'null'. By convention, method names should always begin with a lowercase letter, so I changed 'Available' to 'available'.
Switching Images
By David.Budnick, with 7 replies.
Last reply by danpost, almost 13 years ago:
Then, the size of the snake needs to be determined before the snake is placed into the world. This means that it will need a value passed to it, to let it know what size to be. You need a Snake class constructor like what follows and you need to move the score field to the Hedgehog class with a 'get' method that returns the score. <Code Omitted>In your world constructor, or a method it calls, create the snake object with 'new Snake(0)'
help with movement
By manish123, with 3 replies.
Last reply by manish123, almost 13 years ago:
Thanks danpost! Yea that would have worked also but i solved the problem by making 2 variables "x" and "y" and then minus 1 from y if it moved up and etc.... then i did setLocation(getX() + x, getY() + y) :D
The code is removing the object but how to replace the object with another object or with another image
By JERRY**5, with 12 replies.
Last reply by JERRY**5, almost 13 years ago:
Thanks
Help with avoiding obstacles.
By JTSCADET, with 1 reply.
Replied to by JTSCADET, almost 13 years ago:
Okay well I found a way around my problem sorry if this wasted your time.
Changing color when mouse is hovering
By Sniper, with 6 replies.
Last reply by Sniper, almost 13 years ago:
Thanks guys! That worked with a little tweeking :D
How do I Write a Method that can check to see if there are objects at adjacent cells surrounding the Object Giving Birth?
By JasonZhu, with 3 replies.
Last reply by danpost, almost 13 years ago:
You could just put the spawning code inside an 'if' block using 'if (getWorld().getObjects(Rabbit.class).size() < 500)'. The 500 being a possible limit on the number of Rabbit object for the world to have.
Scoreboard
By hiro6689, with 1 reply.
Replied to by SPower, almost 13 years ago:
Yes, take a look at the documentation for the UserInfo class, where you can save the players score, and you can import the scoreboard class by going to: -edit -import class -select 'ScoreBoard' -import
Help me with code its urgent
By JERRY**5, with 5 replies.
Last reply by erdelf, almost 13 years ago:
Maybe u should read what danpost said, it would be better to write the code in the class of the Man. and if u are getting errors, copy/paste them
timer coding, need help :(
By mattie1606, with 2 replies.
Last reply by mattie1606, almost 13 years ago:
davmac wrote...
You haven't said what you mean by didn't work, but one problem I see is where you check millisElapsed in win() - <Code Omitted> This requires the milliseconds elapsed to be exactly 6000 and no more. I think it's not likely you'll always get that. You should probably have: <Code Omitted>
the goal of the game is to survive for 60 seconds and after 60 seconds the game had to stop, which didnt work.. but with your help it did so thanks
792
793
794
795
796
797
798
X