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
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.
changing worlds by choices
By bangtan, with 1 reply.
Replied to by danpost, over 4 years ago:
Please provide full class.
levels
By bangtan, with 1 reply.
Replied to by danpost, over 4 years ago:
bangtan wrote...
i have three levels, easy unli attempts, average 3 attempts, difficult 5minute timer. how could i possibly code it in one actor
That would be considered game control and should be coded in your game world.
input text box
By bangtan, with 1 reply.
Replied to by danpost, over 4 years ago:
You could inserting the following at line 28: <Code Omitted>
input text box
By bangtan, with no replies.
i have successfully made to ask the player to input a value. i asked the player to input the answer on the problem given on the game and i assigned a certain value for the correct answer. i tried to answer to see if the program is working and inserted a wrong value, then the try again world appeared. i tried to reset the whole game but when it comes to the ask part, the "try again" automatically appears. how can i reset the input value? Here is my program. <Code Omitted>
help idk what i must to do
By mariq_rasyid29, with 3 replies.
Last reply by danpost, over 4 years ago:
mariq_rasyid29 wrote...
This is the eror code form terminal idk what i must to do << Error Trace Omitted >>
That appears to be a greenfoot bug -- not sure.
69
70
71
72
73
74
75
X