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
Actor won't spawn?
By Cooleb, with 9 replies.
Last reply by danpost, about 6 years ago:
When your MyWorld object (or, your world) is created, the initial value of
friendClicked
is set to zero by line 107 (fields are created and set to their initial values before the constructor is executed). Since a constructor is only executed once per object created, the condition on line 31 will always be
true
and the
else
part of that
if-else
structure will never execute. Anything done after initial creation of an object cannot feasibly be coded in the constructor. Sometimes, some finalizing set-up is required once an actor is added to a world or when a world is
Null pointer exception
By scaps, with 1 reply.
Replied to by Super_Hippo, about 6 years ago:
Change ‘world’ in line 20 to ‘getWorld()’. You might want to change ‘projectile’ to ‘new Projectile()’ as well.
Read a text file with Scanner class
By Fargesia, with 17 replies.
Last reply by Fargesia, about 6 years ago:
Ok works fine now, thank you guys!
Making the hearts disappear (Lives) HELP PLEASE
By xlama, with 4 replies.
Last reply by danpost, about 6 years ago:
xlama wrote...
I tried that but it would just remove them all at once and stops the game.
Okay. Possible solutions are (1) you could just remove the car collided with; or (2) you could create another class to take the image of collided car and replace the car with it.
Scrolling
By AdiBak, with 1 reply.
Replied to by danpost, about 6 years ago:
Please refer to my
Scrolling Tutorial
scenario.
Making one new bird object when an existing bird object touches bottom of world
By BigBoy123, with 2 replies.
Last reply by Dr.Blythe, about 6 years ago:
*ahem*, really?
Why is is not returning time
By DaRafster, with 7 replies.
Last reply by danpost, about 6 years ago:
DaRafster wrote...
The world that the enemySpacecraft actor is in is a world subclass of Galaxy. So would this still be the same thing? Would I have to access the timer from the original world?
That was little confusing -- as what would be the "original world". At any rate, let me explain this way. When you extend a class, what you are doing is creating a union of classes to describe the same type object as the class being extended creates. The extending class can add new possible states (fields) for the object or add, modify and/or remove behaviors that the object can do (by adding
Is it too shaggy?
By CHEGAMERXD, with no replies.
<Code Omitted>
I want to code on Roblox but I can't open Roblox Studio
By CHEGAMERXD, with 1 reply.
Replied to by CHEGAMERXD, about 6 years ago:
OK I think my PC is old I think i cant run it :(
Dang
idk
I need some help with locations from another class
By Cats123, with 19 replies.
Last reply by danpost, about 6 years ago:
Cats123 wrote...
ok i did that and it actually shoots now but the viralload doesnt go at the angle it's supposed to. It just goes straight
That may be because your location coordinates are stored in
int
fields. Any fractional movement in both the horizontal and vertical directions is lost when you use
getX
and
getY
in a
setLocation
statement. Retain the location coordinates in
double
fields and adjust their values so you can set the new locations.
need help with my file dialog
By Cats123, with 52 replies.
Last reply by Dr.Blythe, about 6 years ago:
*ahem*, really?
can anyone help with getting my highscore in my scoreboard
By Ac951, with 1 reply.
Replied to by Dr.Blythe, about 6 years ago:
Little bit late at this point in time, but *ahem*, really?
need help with my scoreboard
By Ac951, with 11 replies.
Last reply by Dr.Blythe, about 6 years ago:
Little bit late at this point in time, but *ahem*, really?
cant get my scoreboard to work
By Ac951, with 1 reply.
Replied to by Dr.Blythe, about 6 years ago:
Little bit late at this point in time, but *ahem*, really?
Need help with my java code
By Ac951, with 37 replies.
Last reply by Dr.Blythe, about 6 years ago:
Little bit late at this point in time, but *ahem*, really?
129
130
131
132
133
134
135
X