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 make multiples objects out of 1 actor subclass and how do i make them come from out of the screen?
By lilshopa, with 13 replies.
Last reply by danpost, almost 6 years ago:
You need to use an
act
method in your
Mundo1
class to spawn the enemies.
Changed image
By Brandman73, with 8 replies.
Last reply by danpost, almost 6 years ago:
Brandman73 wrote...
if you are curious, here is my flipping code: << Code Omitted >>
That will flip the given image with one little problem. In line 9, use "img.getWidth()-1-x".
cant figure out why my it says reached end of file while parsing
By Anonymous123, with 8 replies.
Last reply by Anonymous123, almost 6 years ago:
Thanks it works now. However when i opened it again the last public the P was for some reason wrong. ill just fiddle with it for a few hours. Thanks for the help danpost. Have a great day, Cheers, anonymous123
new user
By bani_saputra, with 1 reply.
Replied to by danpost, almost 6 years ago:
bani_saputra wrote...
i want to ask about inputing variable?
"inputing variables"? Do you mean inputting values (like user types in a number or some text; or reading data from a file) or adding variables into your code (allowing a state to be changeable -- like speed or color, for example)? So ... ask away.
Need help with programming a random seat generator.
By hello0209, with 5 replies.
Last reply by danpost, almost 6 years ago:
hello0209 wrote...
Where would I add the code? I'm really sorry, I have completely no idea about coding.
After the array is filled.
reseting a level in a game without reseting the variables
By Mr.Sparrow, with 1 reply.
Replied to by danpost, almost 6 years ago:
Show your world code and indicate which fields need to keep their values.
How to take user input from box and turn it into a variable
By Sammyy2323, with 12 replies.
Last reply by danpost, almost 6 years ago:
Okay. Now I can see how to code it. In
MyWorld
class, insert at line 12: <Code Omitted>and at line 29 (to be 2nd line in prepare method): <Code Omitted> Now, in the
Answer4
class, you can use: <Code Omitted>
how do i limit my scenario so my object cant pass it?
By lilshopa, with 11 replies.
Last reply by lilshopa, almost 6 years ago:
thank you guys! i got it
adding png
By Roshan123, with 17 replies.
Last reply by Kostya20052011, almost 6 years ago:
You can write Blast blast;, but this will not give the result, it is necessary, if you want to manage the created object from the given one, you just need to create a new object.
how to make appear text while clicking on an image of a button?
By ronald, with 8 replies.
Last reply by ronald, almost 6 years ago:
thank you
How to fix Nullpointerexception ERROR
By EthanWasHere_, with 3 replies.
Last reply by danpost, almost 6 years ago:
Where do you have "new Feet()" in your code?
how do i make an object move forward in the direction its facing
By ninjapuffin, with 9 replies.
Last reply by RcCookie, almost 6 years ago:
So if you want your Actor to move sideways you can do this: <Code Omitted>If you want your actor to be steered by the left and right key and always move in the direction it is facing, you want to do something like this: <Code Omitted>In this case though, like danpost mention
Making a variable that takes all the numbers from an array
By Sammyy2323, with 2 replies.
Last reply by danpost, almost 6 years ago:
Sammyy2323 wrote...
i want num, num1,num2,num 3 to be added into a variable and then I pass it to a different method
Why can't you just pass the array?
Filename null pointer error while using array
By Mattzh, with 3 replies.
Last reply by danpost, almost 6 years ago:
You only need to fill the array (or, rather, call shipImage) once (when the spaceship object is created). By calling it from act, you are repeatedly filling the array. Add a constructor to the spaceship class and call it from there. Actually, just call
fillArray
from there. It seems a bit much to have a method call a single method in the same class when you can just call that second method. Moreover, you could just code the filling of the array in the constructor (so no shipImage or fillArray method). As far as the
IllegalStateException
error, just put the calling of
y
adding obj with decimal point
By Roshan123, with 2 replies.
Last reply by Roshan123, almost 6 years ago:
ok thanks
119
120
121
122
123
124
125
X