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
Editor Problems
By Toly, with 2 replies.
Last reply by Toly, almost 10 years ago:
Thanks! As soon as I tried this, it started working!
Need help moving worms
By Alucard, with 2 replies.
Last reply by Toly, almost 10 years ago:
What you have is public void checkKeypress() { if (Greenfoot.isKeyLeft("up")) { turn(-3); } if (Greenfoot.isKeyRigh("down")) { turn(3); } } } It should be public void checkKeypress() { if (Greenfoot.isKeyDown("up")) { turn(-3); } if (Greenfoot.isKeyDown("down")) { turn(3); } } } Greenfoot.isKeyDown just means if the key is being pressed or not, not which key is being pressed.
Having trouble updating Wolrd when changing slider.
By RedPanda98, with 3 replies.
Last reply by danpost, almost 10 years ago:
Okay -- the slider class is not limited, as far as its behavior, to your project (other than what its name implies). That is, there is no code in it which refers to other classes specific to your project. This means that it is re-usable and portable (after generalizing the name and the value fields, 'temp' and 'particles'). In turn, it means that you do not need multiple classes, one for each type slider; you can have one Slider class and use it for all your Slider objects (the value field should be an instance field, not a class field -- not 'static'). Anyway, to get back to your issue,
Wait Function
By AMiscool, with 3 replies.
Last reply by danpost, almost 10 years ago:
AMiscool wrote...
@danpost It doesn't really matter for me. I morely want the user to be able to hold down the button while shots are fired with a 3 second delay. But if you can't, then its fine with the other option.
The you only need at an instance int field for a delay timer. When a shot is fired set it to like 150 or 200. In the act method you can ask if it is zero or not; when zero, shoot if key is pressed; if not zero, subtract one from it:
Open Edidtor
By settledacorn, with 2 replies.
Last reply by danpost, almost 10 years ago:
trimil wrote...
What do you mean by "cheat things", exactly?
I believe it is the auto-completion feature that is being referred to here. I am not familiar with the latest version of greenfoot; but, possibly there is some new control within the preferences that can be adjusted for this (from menubar: "Edit>Preferences.." -- maybe in the 'Editor' tab).
Java heap space
By Vellyxenya, with 11 replies.
Last reply by danpost, almost 10 years ago:
Vellyxenya wrote...
I checked again and after adding more sounds it's 250 Mo: 200Mo for the sounds 30Mo for the images 20Mo for the rest Didn't expect that the sounds would be so heavy
You could temporarily comment out all statements relating to sounds and remove the sound files from the project (saving them somewhere outside the project folder so you can re-import them later); then, see if you still have heap space issues.
Start a void in the World from an actor
By Zyon900, with 5 replies.
Last reply by danpost, almost 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, almost 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, almost 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, almost 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, almost 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, almost 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, almost 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, almost 10 years ago:
At the end, add this: <Code Omitted>
487
488
489
490
491
492
493
X