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
Changing an Actor's Image
By Nokomanida, with 7 replies.
Last reply by Nokomanida, almost 11 years ago:
Thanks for all the responses, I ended up sitting down last night and truly thought about it, and what I ended up doing was
Problem with Images in Array
By elementa, with 3 replies.
Last reply by danpost, almost 11 years ago:
No. I do not see anything here that might cause it, either. But, you can remove both lines 13 and 14 from the code.
No background-color GreenfootImage
By Pharetra, with 2 replies.
Last reply by danpost, almost 11 years ago:
You can also use: <Code Omitted>
Help using mouse clicks to change worlds!
By ADK, with 1 reply.
Replied to by danpost, almost 11 years ago:
Please read the documentation of the 'mouseClicked' method of the
Greenfoot class
.
Problem game over flappy bird
By AlfinJr, with 1 reply.
Replied to by xFabi, almost 11 years ago:
get a Condition for the gameover screen to get triggered e.g if bird is hit, Example = 1 then use <Code Omitted>Ofc you have to create a gameover class, with the image set to the screen u want it to look like
如何讓子彈變色
By dredrese, with 2 replies.
Last reply by xFabi, almost 11 years ago:
English translation please :D
Audio and auto fit screen
By DesaGrammer, with 2 replies.
Last reply by DesaGrammer, almost 11 years ago:
Thanks
Shooting and item
By DesaGrammer, with 5 replies.
Last reply by DesaGrammer, almost 11 years ago:
Thanks I made a game a wile ago and for got that they turned anyway But thanks
Firing Bullets
By DesaGrammer, with 4 replies.
Last reply by DesaGrammer, almost 11 years ago:
Thank that helped alot
get counter from several levels to one next level
By Steven.Z., with 4 replies.
Last reply by Steven.Z., almost 11 years ago:
thanks
Actor not in world? How can I fix it? :)
By Pe1per, with 4 replies.
Last reply by danpost, almost 11 years ago:
Since the player will "continuously" move and therefore "continuously" change the target location, the code will need to be placed in the act method of the enemies. If you "always" want them to turn toward the player, you should either use the World instance 'getObjects' method to get the player object or use the Actor instance 'getObjectsInRange' method using a very large range. Whichever way you go, make sure an object is returned in the list before trying to get the object and getting its location coordinates to turn toward.
getworld() returns null
By M138A, with 10 replies.
Last reply by M138A, almost 11 years ago:
danpost wrote...
Now, add this constructor where you had the old one: <Code Omitted>
Thanks danpost that works!
Problems with Greenfoot.delay()
By olenz, with 17 replies.
Last reply by olenz, almost 11 years ago:
Indeed, that seems to work! Nice workaround, thanks!
Adding values of the array?
By elementa, with 1 reply.
Replied to by danpost, almost 11 years ago:
First thing, I do not see any place where you are actually changing the image. Line 2 assigns an image to the field 'displaytext' and line 5 continuously sets that image to the DisplayText object (the assignment of the image to the field is done once when the DisplayText object is created). Second thing, The image does not have to be continuously set in the act method. In fact, the DisplayText object does not have any actions to perform -- it just sits there in the world displaying its image, not doing anything in particular. The only time any changes occur to it is when a door is pressed,
Actor changes color when mirrorHorizontally is called
By Tokinator420, with 1 reply.
Replied to by danpost, almost 11 years ago:
That is a known issue and is believed to be a bug in JDK 7. As an alternative, you can use the following method which I created because of this issue: <Code Omitted>
610
611
612
613
614
615
616
X