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
Trouble with second character and Background
By Paciman, with 18 replies.
Last reply by Paciman, over 6 years ago:
danpost wrote...
Paciman wrote...
I wrote it like this, what should i correct ? << Code Omitted >>
Remove the last
if
structure around the scrolling code.
Okay i found my mistake Thanks for giving me so much of your time
New Sign Up
By sivlayyi, with 1 reply.
Replied to by danpost, over 6 years ago:
sivlayyi wrote...
Hello everyone, i'm a new one on this. Pls help guide line me.
Please check out the '
About
' (overview), '
Documentation
' (tutorials) and '
Download
' (IDE acquisition) tabs above.
How do i scale down an image?
By NateysWowed, with 3 replies.
Last reply by danpost, over 6 years ago:
So -- A1: Yes. A2: Upon creation. A3: As shown. Change '
void act()
' to '
BlockOne()
'.
how i can make my actor take points
By Petr, with 2 replies.
Last reply by Petr, over 6 years ago:
thx man now thanks to you i completed my game.
Would like some assistance with questions
By RShock, with 5 replies.
Last reply by RShock, over 6 years ago:
Alright, so here is what I have: 2. When if - statements are evaluated the condition can only be true or false. The if - statement will be executed only when the condition is true. 3. Superclass
How to change my world with actors
By Petr, with 9 replies.
Last reply by danpost, over 6 years ago:
Now your
addedToWorld
method has too many parameters. So, it does not have the correct method signature to be automatically called by greenfoot when the actor is added to the world. Hence,
boardImage
is not assigned any
GreenfootImage
object and remains containing a
null
value. I, however, do not see anything in the code that would require the need to know what type of world the actor is in. If all you need is the width of the world: <Code Omitted>would be sufficient:
Set actor to random location when hitting the border of the world
By Mattzh, with 5 replies.
Last reply by Vishnu19, over 6 years ago:
I just changed it to <Code Omitted> It works, thank you so much!
How do I create a method to do the following, and does the order matter
By Vishnu19, with 2 replies.
Last reply by Vishnu19, over 6 years ago:
Very helpful, thanks!
Value of Variable won´t change
By JohannesDerHeld, with 2 replies.
Last reply by JohannesDerHeld, over 6 years ago:
Thank you, my fault. Fixed it by calling player.gameOver() instead of just gameOver() in Flag.
How to I make "Gravity"?
By pio22mibi, with 2 replies.
Last reply by Gamingprotramp7, over 6 years ago:
Gamingprotramp7 wrote...
private final int GRAVITY = 1; //gravity. to make it fall. Final int so it cant be changed unless you hard code it. private int velocity; //optional. makes it fall faster over time. makes it more realistic. public void fall() //fall. method for gravity to work { setLocation(getX(), getY() + velocity); //makes character fall depending on velocity if (isOnSolidGround()) //checks if boolean isOnSolidGround() is true { velocity = 0; //sets velocity to 0 if its on solid ground so the character doesnt fall through objects
Score counter isn't working
By annika.g, with 5 replies.
Last reply by danpost, over 6 years ago:
I do not see anywhere where the score is upped when hitting a ghost. Also, I do not see from where the
hitBlauerGeist
method is being called. Q: in what class is the 19-line code set just given above? and why is there a
score
field there when you already have one in the
Counter1
class?
Text box
By Chase, with 9 replies.
Last reply by danpost, over 6 years ago:
Chase wrote...
so how can I just add it to an actor instead of making it an actor?
What ?? I indicated that you created one. Creating it does not put it in your world, however. You need to add that (created)
TextArea
object into the world to make it show.
Problem with lay down object
By JB_needs_help, with 1 reply.
Replied to by danpost, over 6 years ago:
JB_needs_help wrote...
Hey guys, im new at greenfoot. how can i lay down an object after i took it?
What steps were required when taking the object? (show code)
automatically move an actor
By svenfrijters, with 1 reply.
Replied to by danpost, over 6 years ago:
Using
turn(180)
instead of
setRotation(180)
will make it repeat. To go 2 cells instead of 1 may require an int counter. Being you only want it to move 2 cells, a boolean may work just as well. Even a simple: <Code Omitted>may even work (without a field at all).
I need help with a level select screen
By kahn, with 4 replies.
Last reply by kahn, over 6 years ago:
nvm i figured it out thanks
156
157
158
159
160
161
162
X