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 can I add a picture
By Jhoffi, with 2 replies.
Last reply by danpost, over 3 years ago:
To set an image to a question, do it the same way as you did
questionText
or
explanation
. Use
String
filename of image. The code given above is only for construction. It has nothing to do with the actual asking and answering of the questions (it only provides the contents of each question). So,
setImage
and
addObject
are not used in that block of code.
addObject in Actor class returns null
By Shqxin, with 2 replies.
Last reply by Shqxin, over 3 years ago:
it works! thanks!
how do i remove an actor
By Toni, with 1 reply.
Replied to by danpost, over 3 years ago:
Are you calling
die()
from anywhere?
Text in Greenfoot?
By Jhoffi, with 5 replies.
Last reply by danpost, over 3 years ago:
You could also do it this way: <Code Omitted>
STAR WARS
By ronald, with 9 replies.
Last reply by danpost, over 3 years ago:
Any time you make a call from
act
that (1) could potentially remove the actor from the world and (2) has code beyond the call that requires the actor to be in the world, you should do something like placing the following line after the call: <Code Omitted>
How can I get this program to run properly?
By divinity, with 25 replies.
Last reply by danpost, over 3 years ago:
divinity wrote...
but all of the names address etc are strings, dont u see that
Of course I see that. Then no problem.
int Letters & Check boolean is true?
By Gabe1098, with 7 replies.
Last reply by Gabe1098, over 3 years ago:
Super_Hippo wrote...
That seems to be a String. <Code Omitted>int is only used for whole numbers.
Thank you it works!
How can I randomise questions?
By Jhoffi, with 1 reply.
Replied to by Super_Hippo, over 3 years ago:
Assuming you call that method after a question was answered, you could remove the question out of the ArrayList and then switch to a random remaining one. <Code Omitted> Alternatively, you could shuffle the elements of your array randomly at the beginning of your code.
instantiate new object at specific coordinates
By footsniffer74, with 3 replies.
Last reply by danpost, over 3 years ago:
footsniffer74 wrote...
growing would be best, its meant to be like a rising sea level
Best might be to use one actor that slowly moves up showing more of its image hiding below the world's edge. Using multiple actors will cause a streaking effect along the bottom edge of the images.
NEED HELP 2D CAMERA CONTROLS
By footsniffer74, with 1 reply.
Replied to by danpost, over 3 years ago:
footsniffer74 wrote...
im making a 2d platformer, is there anyway to make extend the game world but keep the camera centralised on the player with a screen size of like 600x400?
Please refer to my
Scrolling Tutorial
scenario.
Actor movement not working
By Beaver, with 1 reply.
Replied to by danpost, over 3 years ago:
From what I see, it will take like 6 to 7 seconds before its initial moves (due to large timer value of 400), if it moves at all. Then it will not move again as timer is never reset.
Dance game notes not being removed
By Beaver, with 15 replies.
Last reply by Beaver, over 3 years ago:
Actually, I tried the boolean method a few more times, made the hitbox a bit thinner and I can finally say that it works. Thanks for the help :)
Java assignment
By Roshan123, with 3 replies.
Last reply by danpost, over 3 years ago:
Roshan123 wrote...
i m not able to get the required answers. Would u plz
only
tell me the answer of 2 and 5 number...plz
2 is vague as only things really needed are boolean loop control and code block. 5 deals with
while
and
do-while
difference (discussed in tutorial).
Problem with getKey()
By Turbo_Thorsten, with 14 replies.
Last reply by danpost, over 3 years ago:
Super_Hippo wrote...
Maybe your k key is broken?
Try a different key, like "a" (for
a
utomove).
How long does it take for code to run?
By Gabe1098, with 5 replies.
Last reply by Gabe1098, over 3 years ago:
danpost wrote...
In your code above, the ONLY thing that may cause a delay is something stemming from "
new Spider()
", which executes "
public Spider()
" in your
Spider
class. Hence, why I asked for its codes.
Ohhh Thanks!
58
59
60
61
62
63
64
X