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
hitboxes
By mole2003, with 3 replies.
Last reply by Super_Hippo, about 8 years ago:
Copy the Collision class into your project and let all classes which need to perform the checks extend this class.
Drawing many lines between many points
By TheGoldenProof, with 1 reply.
Replied to by TheGoldenProof, about 8 years ago:
OK I fixed it. Changed my code to this (the part that fixed it was taking the GreenfootImage lines = ... and the setBackground(lines) out of the loop):
actors spawning in on a repeating cycle
By mole2003, with 9 replies.
Last reply by Super_Hippo, about 8 years ago:
Move both lines (remove the "private" in the beginning) to between line 34 and 35.
Programming A Bot!
By comlink, with 2 replies.
Last reply by comlink, about 8 years ago:
Okay, I'll try it out! Thanks for your quick response!
Writing a proper randomly generated map
By Xolkiyr, with 3 replies.
Last reply by Super_Hippo, about 8 years ago:
What did you try?
pausing greenfoot
By mole2003, with 3 replies.
Last reply by mole2003, about 8 years ago:
Nevermind it iis fixed now
Variable kept across all classes
By mole2003, with 1 reply.
Replied to by Super_Hippo, about 8 years ago:
Store the variable in your world and make it possible to access the variable with a getter method. <Code Omitted>Then, to access value of the score variable from an object inside this world, you can do: <Code Omitted>
getX, getY problems
By Ticker175, with 6 replies.
Last reply by Ticker175, over 8 years ago:
Ok awesome thanks for the help =)
Keeping a jump code whilst scolling
By mole2003, with 11 replies.
Last reply by danpost, over 8 years ago:
mole2003 wrote...
Which bits do I need from the code and where shall I put them
Actually, all you probably need is: <Code Omitted>in the
Trex
class
act
method.
Greenfoot version 3.5.0
By davmac, with 21 replies.
Last reply by davmac, over 8 years ago:
Homer wrote...
By the way: as it seems the same error occurs when an Actor subclass has a second constructor ("An object with this name already exists.").
Thanks, added to ticket.
Decimals
By mole2003, with 1 reply.
Replied to by Super_Hippo, over 8 years ago:
You can't. However, you can use doubles. Import the SmoothMover class and make your class a subclass of that. Then you can use doubles as a speed variable.
How can I make an object disappear as soon as it hits the edge of the map?
By MinexTheOne, with 1 reply.
Replied to by danpost, over 8 years ago:
MinexTheOne wrote...
I was trying to use this code, it doesn't show anything wrong with it when I wrote it down, but when it comes in contact of the edge of the map an error message pops up saying; at hook.Vanish(hook.java:35) at hook.act(hook.java:23). (Hook is the subclass I wanna make it disappear. And vanish is what the method is called which tries to make it vanish.) << Code Omitted >>
Although you did not include what type of error you were getting, it is not to difficult to tell it was probably an IllegalStateException (due to actor not in world). If your actor touches the righ
Greenfoot isTouching() issues
By Facehugger, with 2 replies.
Last reply by Facehugger, over 8 years ago:
Thank you for the clarification, it help me figure it out.
Using Gevater_Tod4711's Infinite Scrolling World
By Xolkiyr, with 1 reply.
Replied to by Xolkiyr, over 8 years ago:
This is my workaround that I'm trying.. not exactly accurate because I'm sure there's a much more efficient way to do it.
Cell quantity
By Parth27, with 1 reply.
Replied to by danpost, over 8 years ago:
Parth27 wrote...
How many cells are there by default in a, 600 by 480, world
With a World constructor call of <Code Omitted>a world will have WIDTH*HEIGHT number of cells (regardless of CELL_SIZE). A world that is 600x480 will have 288 thousand cells.
244
245
246
247
248
249
250
X