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
Start a void in the World from an actor
By Zyon900, with 5 replies.
Last reply by danpost, over 10 years ago:
Zyon900 wrote...
I have it , the worlds it will be in, check if a boolean is true, and the actor is setting the boolean true
Are you saying you fixed it with this? or are you continuing with your explanation of your issue and it is not yet fixed?
Methods
By Freekywill, with 4 replies.
Last reply by danpost, over 10 years ago:
A mini-map should be an Actor object created by a subclass of Actor. It can update itself depending on the current state of the World object it is located in. Its behavior (code in its act method; or, its updating) can be defined for the specific type world you will be placing it in.
What Is a String Variable?
By AMiscool, with 1 reply.
Replied to by Super_Hippo, over 10 years ago:
A String variable is a string of characters. You can create it like this: <Code Omitted>
Actor spawning
By runsngoses, with 16 replies.
Last reply by RPGghut, over 10 years ago:
This would be my way to figuring it out, This script goes on the level:
The Reset Button
By Vellyxenya, with no replies.
Hi, is there a way to prevent the user from clicking on the reset button? I also tried to modify Greenfoot's source code to remove it but it's pretty hard^^ Is there an easier way? (by the way, I want to remove this button, because all the huge variables are initialized in the first world and I don't want to reinitialize them each time... because of the Java Heap Space Error...)
Beginner Sokoban Help
By Mr.$mith, with 4 replies.
Last reply by Mr.$mith, over 10 years ago:
Okay, now I know... Thanks alot danpost!
Right Click Movement (Top-Down Shooter)
By Bench, with 3 replies.
Last reply by Super_Hippo, over 10 years ago:
Try to do it step-by-step. To start, you can use this: <Code Omitted>
Life Counter
By GreenMan15, with 9 replies.
Last reply by GreenMan15, over 10 years ago:
Wait I think I just figured it out?? In my rocket class I made it where the man class would disappear if it was touched by it. I wanted the rocket to disappear when touched by the man so I took that line out and it started working. Now everytime I run it, I always lose 1 life.
How do i make the bullets (Shot) disappear once it reaches the right side of the screen/world?
By needhelpp, with 1 reply.
Replied to by Super_Hippo, over 10 years ago:
At the end, add this: <Code Omitted>
Teach Greenfoot to Y7's or Y8's
By moonandi, with 2 replies.
Last reply by moonandi, over 10 years ago:
no we call it secondary school. I live in the UK
How to get Actor that is not in the world to stop running code
By Hydrowarrior, with 1 reply.
Replied to by danpost, over 10 years ago:
Okay -- you have two methods, 'collide' and 'bottomOfScreen', that each require that the actor be in a world (and each which could remove the object from any world it might be in). A sure fix would be to add the following line as the first line in both methods: <Code Omitted> By the way, line 22 is not needed as there is no code that needs to be avoided after it (the method ends there and execution will return, anyway).
if confirmation dialog = something...
By AdamMyczkowski, with 4 replies.
Last reply by AdamMyczkowski, over 10 years ago:
Oh sorry I didn't mean to include the string in this code, I tried method with an input before and forgot to delete the 'string'
How to fix unreachable statement error, and have boolean return true??
By KeithM, with 4 replies.
Last reply by danpost, over 10 years ago:
Replace lines 70 through 73 with the following: <Code Omitted>This should not really change anything from the code it replaces; but, if ever a Food object is removed, which you seem to indicate happens with "When <such-n-such>,
then
the food is never removed...", the method must return a true value. All this is rather immaterial, as the value returned is not used through the call to the 'eat' method. That is, line 15: <Code Omitted>calls the method, but ignores totally any returned value.
Execute another program with argument from java
By vicbuenaventura, with no replies.
Hello, I'm using Greenfoot on Mac OSX as user interface to open another program (the program is called CLIPS expert system). I'm able to do it with the following code: <Code Omitted> But I also want to pass an argument in the form of a batch file (entitled "runfile.txt") so that when CLIPS opens, I want it to automatically execute the commands I've written in the batch file (such as loading a construct from a file, resetting, running, and exiting CLIPS). I tried the following code but it did not do anything: <Code Omitted> Additionally, I tried the following code and it did not do anything either: <Code Omitted>Does anyone know how to code what I'm trying to accomplish? Thanks, Vic
Trying to remove an object
By GreenMan15, with 2 replies.
Last reply by GreenMan15, over 10 years ago:
Wow can't believe it was a small thing like that. Thank you
489
490
491
492
493
494
495
X