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 move bullet creation location
By howdoesonecode, with 16 replies.
Last reply by danpost, over 10 years ago:
Ok. What you are trying to say without really saying it is that the bullets are being created and placed in the world properly, but they are not moving like they should be. If you look in your bullet class, you will notice that the value of the 'speed' field is never initialized to anything; so, the speed of each bullet created is zero. You need to assign a positive value to the field either when declared or in the bullet constructor code block.
dont want to run into self!HELP??
By Moho, with 4 replies.
Last reply by Moho, over 10 years ago:
i tried but it still didnt work. i programmed this extact game a year ago but i got a new computer so i cant go back i just dont recall how i did it.
Natural enemy movement
By howdoesonecode, with 3 replies.
Last reply by danpost, over 10 years ago:
You can slow them down by changing 'move(2)' to 'move(1)'. As far as the strangeness, you just have to fiddle with the turn values or add more code to be more specific as to how you want them to move.
Fading Timer and Hovering
By Ariadia, with 4 replies.
Last reply by danpost, over 10 years ago:
Ariadia wrote...
As for the hover, If I do animate it out of the program, will the code still work with it? For example, if I have the object getting the ground at offset, will it change? Or does it work with a bounding box? (Does that question make sense?)
It is unclear what you mean by animating the hover out of the program as all animation must be done through code. Also, 'the code' in 'will the code still work' can only be presumed to be the fading code, where fading and hovering have nothing to do with each other unless you specifically add code to have the state of one cause a ch
NVidia driver crash on startup
By erdelf, with 1 reply.
Replied to by erdelf, over 10 years ago:
*bump*
bullets disappear when hit and enemy
By howdoesonecode, with no replies.
i need the bullets to disappear when it intersects with an enemy
I need some help here
By Epickiller10, with 2 replies.
Last reply by Epickiller10, over 10 years ago:
let me rework this post/problem stuff a bit later because i have to figure out what is wrong myself, my main problem although is that i am getting syntax errors caused by the vector class
Setting direction to the mouse
By BrownBoii333, with 11 replies.
Last reply by Super_Hippo, over 10 years ago:
You create the double 'force' in the constructor. This value is lost once the method is left. So it isn't saved after that and can't be found.
Game!
By MrGigglez, with 1 reply.
Replied to by danpost, over 10 years ago:
Start with the class of the car -- give it the ability of variable speed (use a speed field and a method to increase the speed).
Help Needed! Creating an actor relevant to another actor
By TheGoldenBucket, with 2 replies.
Last reply by TheGoldenBucket, over 10 years ago:
Sorry about my absence from this discussion, been a bit busy. Anyways, I believe that I have found another discussion that will fulfill my needs. Thank You! -TheGoldenBucket
Counter!
By Pe1per, with 14 replies.
Last reply by Pe1per, over 10 years ago:
thank you ;)
Painting Starts onto a Background Image
By theDoctor, with 103 replies.
Last reply by danpost, over 10 years ago:
@richardzombie, please start a new discussion thread for your issue and do not revive old threads. Also, please show your code for what you have tried.
One actor 2 times, Removing one
By sjoerdieman, with 1 reply.
Replied to by danpost, over 10 years ago:
You can add a reference field to the class to hold the added actor so you can remove it when the conditions are right (I presume at line 35): <Code Omitted>then when creating it: <Code Omitted>and to remove it: <Code Omitted>I am skeptical a
Help Needed With Score Going Up To 15
By Manda_x, with 6 replies.
Last reply by davmac, over 10 years ago:
Manda_x wrote...
nop, I don't understand.
lines 3-5 of what you posted in the Counter class, do not belong in that class. You need to put those lines at whatever point it is that you want to increase the count - that is, whenever your main actor collects a target. This will probably be in the main actor class.
File reading works in editor, but not after exported.
By EnderPicture, with 6 replies.
Last reply by davmac, over 10 years ago:
An applet does not normally have permission to read and write files on the local system, so you can't user FileReader as you do above. Also, the file when exported is inside the jar file that makes up your scenario, so it doesn't exist as a separate file. I do have an
example scenario
showing how you can read file contents from files embedded within your scenario, though.
604
605
606
607
608
609
610
X