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
How to use set location to change between multiple worlds
By Tietie12, with 2 replies.
Last reply by Tietie12, over 6 years ago:
thank you so much it works perfectly
Code shows error
By LightningFast, with 5 replies.
Last reply by danpost, over 6 years ago:
LightningFast wrote...
UPDATE: I did fix all that I was confused about! But now I need help throwing the pie in the direction the Hero was detected and not change its path (it's being launched and its path is fixated at the spot the Hero was located at). Right now the x-coordinate changes accordingly to the x-movement of Hero :(
Do not change the rotation (or turn towards anything) in the act method of the bullet.
Problems with getRotation, setRotation
By NotAProYet, with 13 replies.
Last reply by NotAProYet, over 6 years ago:
OH! Sry I totally missed that one... It works just fine... Thanks for your help (again)
Varying PowerBar!
By LightningFast, with 11 replies.
Last reply by LightningFast, over 6 years ago:
yea I can see the confusion... I realised I wasn't really done and didn't understand really much from the tutorial video I was watching. To be honest, I was thinking of like passing the "powerAdd" like a score system to a constructor, like using OOP. I will retry and check in if I run into any problems.
It works, but why?
By RcCookie, with 3 replies.
Last reply by danpost, over 6 years ago:
RcCookie wrote...
I know the general purpose of a try/catch-block, but in this case, the exception is thrown every frame. Nevertheless the Actor does look towards the mouse, witch is what I don’t understand: if there is nothing in mouseInfo, why can it point in the right direction, or the other way around: why does the execution throw an error, if there is a value stored?
The exception is NOT thrown every frame.
fibonacci
By ronald, with 4 replies.
Last reply by ronald, over 6 years ago:
thank you
get actor in front
By Starlord_20, with 4 replies.
Last reply by Starlord_20, over 6 years ago:
Thank you!
Can I make a World a superclass of another World?
By LightningFast, with 5 replies.
Last reply by LightningFast, over 6 years ago:
it works thank you!!!!!
Game does not work
By Sebastiano, with 1 reply.
Replied to by danpost, over 6 years ago:
Sebastiano wrote...
Hello i have made space invaders and works perfectly in greenfoot however i have uploaded it to the site and when you click run it doesnt do anything you can find the game in the most recent scenarios 'space invaders' also i dont know if this helps but i was using greenfoot version 2.4.2
You must use Greenfoot version 3.1.0 or better to have a scenario run in HTML5/javascript.
sound won't play and gives runtime error
By LightningFast, with 7 replies.
Last reply by LightningFast, over 6 years ago:
oh I see, thank you!
How do I make a character bigger?
By LightningFast, with 3 replies.
Last reply by danpost, over 6 years ago:
LightningFast wrote...
should I put this in the world class or the hero class?
In whichever class whose instance is to have that image. Add a constructor to the class and scale the image there.
Actor not in world error when enemy defeated
By marcelw123, with 3 replies.
Last reply by danpost, over 6 years ago:
You cannot have both enemy and player bullet check for each other like that. If one detects the other and removes itself, the other will not realize they were touching.
Restart Timer
By badatcoding1325, with 4 replies.
Last reply by badatcoding1325, over 6 years ago:
OH. Thank you
Activate Gif when Timer Over
By badatcoding1325, with 2 replies.
Last reply by danpost, over 6 years ago:
badatcoding1325 wrote...
oh note: The there is text that it already displays on the timer when it is over however I want to change it to activate a separate gif to appear on screen
Use a separate actor to run the gif. You can adjust lines 200 and 201 to create the actor and put it in the world (before the possibility of removing the timer itself from the world.
collisions
By Bigbobatesloppyjoe, with 1 reply.
Replied to by danpost, over 6 years ago:
Bigbobatesloppyjoe wrote...
I'm making a shooter's game and I want the bullet to disappear when I hit a bad guy. But the code for the collision doesn't seem to work with my if at edge remove the object. here's the code. << Code Omitted >>
Between
shot
and
checkEdge
calls in
act
, place the following line: <Code Omitted>Btw, the
return
statements in your given code are kind of pointlessly placed at the end of the methods. Methods are automatically returned from when the end is reached.
153
154
155
156
157
158
159
X