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 do I align text to the left?
By mkdaniel, with 1 reply.
Replied to by danpost, over 4 years ago:
mkdaniel wrote...
Currently, the text align to the center, but I want it align to the left. Does anyone know the way to do it?
Create an array of
GreenfootImage
objects and fill it with individual text images. Then create one large
GreenfootImage
object whose width is that of the widest text image and whose height is that of one text image multiplied by the number of text images. Finally, draw each text image onto the large image starting along left edge.
Variable with different values inheritance issue
By CreatorMoon, with 5 replies.
Last reply by CreatorMoon, over 4 years ago:
Wow, I can't believe I didn't think to do that. It works perfectly now, thank you so much!
How to make an object move as a parabola?
By ConorK, with 1 reply.
Replied to by danpost, over 4 years ago:
ConorK wrote...
I'm making a game where the story has an unseen character throw an object from below the screen. All I want is for the object to appear on screen and move as if it was thrown in the air(like in a parabola). I also want it to disappear from the world as soon as it reaches the other side of the parabola to show it as if it left the screen. I'd also like it to appear from random places at the bottom of the screen and different sizes of a parabola.
I would refer to my
Flight Trajectories Demo
scenario, but it is a bit much
Greenfoot not opening
By Samuaelk, with 7 replies.
Last reply by Samuaelk, over 4 years ago:
Thanks! Got it working
Pressing a key once to make a Animation?
By trGhuul, with 1 reply.
Replied to by FirewolfTheBrave, over 4 years ago:
I'd recommend you to work with states. Right at the beginning of your code where you declare your variables, declare an additional<Code Omitted> Then, change your code so that pressing E will cause the hero to enter a certain state which will keep executing the state action until something causes another state change. Maybe write something like this:
I need help with creating walls
By Greenfoot_newbie69, with 4 replies.
Last reply by Greenfoot_newbie69, over 4 years ago:
Ah okay i'll keep that in mind, but the walls work now thanks a lot man!
Changing an Actors speed when not on Track
By hernry2812, with 7 replies.
Last reply by hernry2812, over 4 years ago:
Thanks, it works now^^
Help with global variables and falling
By Samuaelk, with 9 replies.
Last reply by Samuaelk, over 4 years ago:
Thanks a bunch man. Love your dedication to this forum. I have been going through the comments and find it awesome that you have been replying to these comments for over 10 years! Keep up the great work!
Problem with gettransperency method
By Roshan123, with 1 reply.
Replied to by danpost, over 4 years ago:
The background image of your world MUST remain completely opaque (NO transparency allowed). You need to find another way to create the effect.
improvement for this code?
By PetrusderEchte, with 3 replies.
Last reply by danpost, over 4 years ago:
Remove line 10. Change line 17 to: <Code Omitted>and add the following at line 19: <Code Omitted>
How To Add A Variable Showing The Speed Of The Object?
By GLOBALHUNT, with 3 replies.
Last reply by Gbasire, over 4 years ago:
you mean, a text displaying the speed of the rocket on screen, or creating a variable to modify the rocket's speed ?
Remove object from world after being shot
By SanderNeele, with 4 replies.
Last reply by danpost, over 4 years ago:
SanderNeele wrote...
So two actions at once.
Yes:
danpost wrote...
<Code Omitted>
... two actors at once.
Implementing Scrolling SuperWorld
By hernry2812, with 3 replies.
Last reply by danpost, over 4 years ago:
hernry2812 wrote...
When my RaceWorld is 1920x1440, the window is in the central of the world. I would like to move the window to another position, because I can't spawn my actor outside of the window.
But you can set its location outside of the window and have the scrolling mechanism "move the camera" back onto it. For example: <Code Omitted>Do this
AFTER
setting the scrolling background.
Error object is hit
By SanderNeele, with 1 reply.
Replied to by danpost, over 4 years ago:
Use: <Code Omitted>for each
raakt...()
call in act.
Single shot
By SanderNeele, with 7 replies.
Last reply by danpost, over 4 years ago:
SanderNeele wrote...
I do not understand what I have to add in the code. I'm quiet new to Greenfoot. Can you show me what the right code is? Thanks!
I mean: <Code Omitted>
78
79
80
81
82
83
84
X