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
How to make an actor move a certain amount
By OfficerRiot, with 15 replies.
Last reply by OfficerRiot, over 8 years ago:
danpost wrote...
OfficerRiot wrote...
Ok that worked but now it plays before i click run
Alright. Time to go back a bit. Remove the constructor and start the sound in the act method using this line: <Code Omitted>Then do the following: <Code Omitted>
That worked :)
How to get bullet to fire in the direction your looking at.
By OfficerRiot, with 4 replies.
Last reply by OfficerRiot, over 8 years ago:
danpost wrote...
OfficerRiot wrote...
Ok, I understand what you're saying but I have no idea where to start on doing that do you have some example code that I could go off of?
See
here
.
Ok, I looked at that but a lot of it I could not understand. Can you give me a little more help?
How to scale multiple images for an actor?
By Aura_, with 2 replies.
Last reply by danpost, over 8 years ago:
Please show the entire class code for context.
Actor rotates randomly
By wmcdnd, with 4 replies.
Last reply by danpost, over 8 years ago:
Probably changing the images is the correct thing to do. However, the world should probably control that part of the game and run a countdown counter to time it out. A boolean is not needed to indicate the edible state of the ghosts -- the value of the timer not being zero is a sufficient check for that state.
How do I populate world easily?
By Omfernando1@gmail.com, with 1 reply.
Replied to by danpost, over 8 years ago:
You could use the
Save the world
feature after placing actors in the world; but then you would need to go over the generated code (in the
prepare
method) and condense it. Another way is the generate the code yourself. If you wish to be shown any examples of reducing code, you will have to show some code that needs reducing.
How do I design a class?
By Astralman, with 2 replies.
Last reply by Astralman, over 8 years ago:
I just said it there. That was the small part.
MUSIC
By Heet_Patel, with 8 replies.
Last reply by Heet_Patel, over 8 years ago:
I have go it to work somehow. tnx for the help. Now is it possible to make a counter which adds a point every few seconds you survive. Sorry for asking so many questions
Removing an object when it's being touch and once it reaches a certain size.
By DMan2000, with 1 reply.
Replied to by danpost, over 8 years ago:
(1)
scale
is a GreenfootImage object method -- not a Class method; (2) a Class object (redballoon.class, in this case) cannot be used to reference any specific object of the class (how could it possibly know which object of the type to use?); Instead of using
isTouching
, use
getOneIntersectingObject
so you can gain a reference to any touching
redBalloon
object: <Code Omitted>I threw in the method cal
AYUDA
By diegoaa, with 1 reply.
Replied to by danpost, over 8 years ago:
<Code Omitted>por ejemplo: <Code Omitted>
Help with arrays?
By Astralman, with 8 replies.
Last reply by Astralman, over 8 years ago:
Same errors.
Endless Scrolling World
By Applez, with 1 reply.
Replied to by danpost, over 8 years ago:
Have you tried my
Scroller
class discussed in my
Scrolling Tutorial
scenario?
Touching image then dying
By SotoVanessa_0022, with 1 reply.
Replied to by danpost, over 8 years ago:
In
Frog
class, you would need
something
like this: <Code Omitted>where the
Turtle
class has a
boolean
method called
hasBadImage
which returns
true
when that particular image is showing.
How do I rotate something each time I click on it with my mouse?
By allsterrrr, with 1 reply.
Replied to by danpost, over 8 years ago:
<Code Omitted>You should familiarize yourself with the methods provided in the classes provided by greenfoot.
Turn Actor While moving in x axis
By Applez, with no replies.
I'm making a racing game and want to make the car look like its switching lanes, i want it to turn right but still move in the X axis. I've tried something like this and it turns the car but the car moves to its right, in other words, the car is doing full circles. <Code Omitted> I want the car to be moving in the X axis (West to east and vice versa) no matter which way the car is facing. I've also tried <Code Omitted> but the car glitches out and appears as 2 images. Thanks in Advance.
Spawn Actor
By Applez, with 3 replies.
Last reply by danpost, over 8 years ago:
You do not need this part: <Code Omitted>
260
261
262
263
264
265
266
X