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
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
How can I save a score and present it at the end screen?
By TylerBlair, with 1 reply.
Replied to by danpost, over 6 years ago:
I do not see where any
EndScreen
world is being created.
step on actor and another one need to disappear
By svenfrijters, with 6 replies.
Last reply by svenfrijters, over 6 years ago:
thx a lot
Greenfoot 3.6.1 released
By nccb, with no replies.
A quick announcement that Greenfoot 3.6.1 is out. You can
download it from the usual place
. This is a bug-fix release that fixes several issues in Greenfoot, including one where Greenfoot could lock-up and not reset properly. More details on the bugs are in the
version history
Exercise 10.48.
By dROS, with 7 replies.
Last reply by danpost, over 6 years ago:
Each time the
MusicUp
button is clicked, a new instance of
Music
is created. The
Music
class is def not designed in any type of "singleton" pattern.
actor losing lives not working
By MsWoof, with 3 replies.
Last reply by danpost, over 6 years ago:
danpost wrote...
You can execute the last two methods given above in your
World
subclass from the
Mario
class just like you call the previous method from the
Mario
class.
Lines 4 and 5 of your new code does not make use of the last two methods I had suggested you use.
Random Attack help
By CH1, with 5 replies.
Last reply by danpost, over 6 years ago:
From what I can tell from what was given,
getRandomNumber
appears to be an undefined variable. Also, the expression for the
if
condition looks to be an
int
value, not a
boolean
one (which is required for a condition). Another problem is the previous line which is just a loose
int
value -- it is like coding a line like: <Code Omitted>or <Code Omitted>(both uncommented) which is really equivalent to <Code Omitted>a non-operative statement. Create a local int variable and assign the random value to it:
Option box
By Chase, with 1 reply.
Replied to by danpost, over 6 years ago:
Chase wrote...
hey, I'm making a game that inorder to go to other locations you click on one of 2 boxs... for an example, your in a room and you have two box's, one says go left and one says go right. problem is I have no clue how to make these...
Basically, you are wanting to make two buttons, which are, in essence, text display actors that clicks are detected on. Please refer to my
Value Display Tutorial
scenario.
Visible object
By Paciman, with 1 reply.
Replied to by danpost, over 6 years ago:
Paciman wrote...
Is it possible if two object are on the same place to choose which object hides behind the other ?
Yes -- and no. The
setPaintOrder
method can be used to have ALL of one type object showing over ALL of another type. Otherwise, there is no documented way of doing it. Currently, however, objects more recently added into the world will show over those objects already in the world. This means you can take an actor and remove and re-add it into the world to have it show above another actor.
Fire class appears before BlueCar reaches X axis
By suzbo, with 4 replies.
Last reply by danpost, over 6 years ago:
suzbo wrote...
Fire class appears before the BlueCar reaches the location of the X axis
With what you have given, I cannot see any reason for what you say is happening. The only strange thing I see (which I cannot expect to be related to your issue) is the exclamation mark inside the filename of the image -- and that may be fine, as is.
Bow Shooting
By insurqassable, with 1 reply.
Replied to by danpost, over 6 years ago:
Remove the counter and add a
boolean
to track the state of the "space" key. Check for a change in the state of the key by comparing current state to previous state (held by field). When a change is detected, update the field and check its new value to determine when to shoot.
exporting scenarios
By TakedaYeet, with no replies.
I finally finished a very simple game where a spider attempts to eat ants. I wanted to save it as an .exe file and found out that you had to save as a .jar file, and compile it into a .exe file.when I export it, it saves as a win.rar file and I can't find the .jar file or anything similar. the only thing I could find is png files, text files, and things of that nature. if there is a way to export it please tell me. thanks in advance.
157
158
159
160
161
162
163
X