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
Dematerializing image
By GingaSnap, with 1 reply.
Replied to by danpost, over 7 years ago:
You could use a for loop to remove multiple pixels at a time. However, the two big problems would be (1) as pixels get removed, the chance lessens in hitting one that needs removed; and (2) determining when ALL pixels have been removed would not be an easy matter. Fading might be a favorable alternative -- gradually diminishing the transparency of the entire image. Or, maybe a combination of the two -- that way, at least the time for total removal is limited to a specific amount.
drawOval move
By ronald, with 16 replies.
Last reply by ronald, over 7 years ago:
thank you
Jumping
By ¿ques♫, with 33 replies.
Last reply by danpost, over 7 years ago:
¿ques♫ wrote...
Hi Danpost, was wondering, how can I edit your Scroller class or the MyWorld class to disable backwards scrolling? I want Mario to still be able to move towards the left edge of the screen, but for backwards scrolling to be disabled (doing this so that any objects that pass the left edge can be removed to reduce lag). << Code Omitted >>
The
Scroller
class should never need modification. My tutorial shows how to allow
scrollActor
roaming before scrolling using specific code in the
scroll
method in your
MyWorrld
class. It should be a simple m
shooting
By liverpoolfc, with 3 replies.
Last reply by danpost, over 7 years ago:
liverpoolfc wrote...
you mean the subclass name?
No, I mean the entire listing of all lines of codes in both classes (in rocket and bullet classes).
Problem with sound
By zizousd, with 2 replies.
Last reply by zizousd, over 7 years ago:
Thanks a lot, now it works, i'll pay more attention with the if commands.
Working with Colors
By Proprogrammer04, with 10 replies.
Last reply by danpost, over 7 years ago:
(1)
getWorld
returns a
World
object -- not a
GreenfootImage
object, which you can set the drawing color of; (2) setting the drawing color does not automatically change anything that was previously drawn; you must redraw the line after setting the new color;
setPaintOrder is making my objects faster?
By puggo7, with 6 replies.
Last reply by puggo7, over 7 years ago:
A couple of cars still over lap, but other than that, my police car works and the most of them don't overlap anymore :). Thank you!
Power Ups
By AnimeRules, with 5 replies.
Last reply by AnimeRules, over 7 years ago:
ok thank you
Carry over score in between levels
By AnimeRules, with 8 replies.
Last reply by AnimeRules, over 7 years ago:
thanks for telling me about classes tho
Finish line
By Mia@2703, with 12 replies.
Last reply by danpost, over 7 years ago:
Mia@2703 wrote...
How do you move an object at a certain time?
With what is given, all that can be provided is a bit of pseudo-code: if (timeToMove) move(); Obviously, this is insufficient. Please provide more details and some attempted code.
How do you get an actor to wrap all the way around the world?
By puggo7, with 9 replies.
Last reply by puggo7, over 7 years ago:
OH wait, you're right... I tried another way and it works much better and keeps the "hopping" at a constant distance! My bad :P
I need Help Can Someone Help i Dont Know How to Spawn Something After 1min Help Pls
By AndyGun, with 4 replies.
Last reply by AndyGun, over 7 years ago:
nvm
i also have this problem if any one can have a look that would be great
By Coltz, with 1 reply.
Replied to by danpost, over 7 years ago:
Remove line 34 (does nothing but create an unused object). The condition on line 20 will never evaluate
true
as only zero (0) can be randomly returned using one (1) on line 19.
im trying to make a actor fade out the world but cant figure it out
By Coltz, with 1 reply.
Replied to by danpost, over 7 years ago:
If you want other things to happen while the fading is taking place (not specified), you cannot use a
while
loop. To fade, you must repeatedly change the transparency value (you consistently set a zero value).
To AndyGun
By Proprogrammer04, with 1 reply.
Replied to by AndyGun, over 7 years ago:
thx
172
173
174
175
176
177
178
X