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
CONSOLE TUTO JAVA
By ronald, with 2 replies.
Last reply by ronald, over 4 years ago:
thank you
Problems with backgrounds images
By Yohanser, with 1 reply.
Replied to by danpost, over 4 years ago:
Not enough information. Provide attempted program code and also details on how you tried to manually set the image.
How to make a smoot mover
By zaaaak, with 1 reply.
Replied to by danpost, over 4 years ago:
You do not need smooth mover support on actors that only move up, down, left and right. Add any one additional direction and you may have a reason to use it.
Converting string statement to integar
By tayyabah72, with 3 replies.
Last reply by danpost, over 4 years ago:
You can use
switch
on
char
value in this way: <Code Omitted>
Ray casting
By Roshan123, with 34 replies.
Last reply by danpost, over 4 years ago:
To be
un
obstructed, the ray is limited to only touch the two actors. It definitely must be less than or equal to two to be truthfully unobstructed. Whether the value used is two or zero is determined by the types of the two actors. If they are of "intersecting" type checked for, use 2. If only one of the two actors is of that type, use 1. If neither is on that type, use 0.
Passing Actors Across Words While Keeping Their Varibles
By yakub, with 6 replies.
Last reply by yakub, over 4 years ago:
Thank you again danpost.
idk what i must to do
By mariq_rasyid29, with 5 replies.
Last reply by danpost, over 4 years ago:
mariq_rasyid29 wrote...
but the scores not increased
I am quite sure it is -- for that
titan1
object. A different (or new)
titan1
object would not show it (at least, none in your world would unless you added the same one back into the world).
Passing More Then one Reference to One Actor
By yakub, with 2 replies.
Last reply by yakub, over 4 years ago:
danpost wrote...
Adjust the constructor to make it work -- public Spaceship(FuelCounter fuelcounter
, HealthCounter healthcounter
)
Thank you, it worked.
can making world class to be list in the actor?
By mariq_rasyid29, with no replies.
i have some of the world for example 1. BattleDugeons World 2. BattleDeeperForest World 3. BattlePersonal World 4. BattleEnemy World idk to execute and making the code for this help me ^^
ANALOG DIGITAL CLOCK USA
By ronald, with 1 reply.
Replied to by danpost, over 4 years ago:
ronald wrote...
I have just exported a scenario but this one does not run Why...
No clue. Not available to download and no code provided here.
my scoreboard doesn't appear
By Projava99, with 1 reply.
Replied to by danpost, over 4 years ago:
Add the following to the class: <Code Omitted>This constructor will initialize the image.
Exporting Scenario
By Dangitsldr40, with 1 reply.
Replied to by Gbasire, over 4 years ago:
can you share the code of your button ?
Creating array to store 100 student ids
By tayyabah72, with 6 replies.
Last reply by danpost, over 4 years ago:
tayyabah72 wrote...
I just wanted to find out different ways of doing the job.
Well, okay; but there should be a reason for dividing up the ids. Let's say you had one, like maybe you have 4 classrooms of 25 students each (classrooms 1, 2, 3 and 4) and you are listing which student is in which room. Then <Code Omitted>and looping through, displaying on screen (after loading ids into the array in similar manner) would be (in a world of least 600 x 560):
How to call method references
By tayyabah72, with 3 replies.
Last reply by danpost, over 4 years ago:
tayyabah72 wrote...
Thats right we are adding the object wombat in this case however i am not sure how to write it all together as one because I haven’t tried this one before.
Add one manually, save the world, then look at the code in your world class (probably called
MyWorld
)..
SLIDER
By ronald, with 6 replies.
Last reply by danpost, over 4 years ago:
ronald wrote...
Addedtoworld is part of the Greenfoot API
Yes,
addedToWorld(World)
is part of the
Actor
class API. To use (aka override) the method, you must duplicate the name precisely and use the same number and type parameters in the same order. Anything else would be a different method altogether.
68
69
70
71
72
73
74
X