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
make act method throw exceptions
By bleeblob43, with 2 replies.
Last reply by bleeblob43, almost 10 years ago:
never mind. I got it working with a try catch statement. Sorry about not posting the code
False in super
By gmacias, with 6 replies.
Last reply by danpost, almost 10 years ago:
gmacias wrote...
so if i typed 'true' would it be the same thing as leaving out the parameter altogether?
Exactly right. Actors will be limited to (0, 0)-(getWorld().getWidth()-1, getWorld().getHeight()-1). The only space that might seem to exist is where half the image of an actor is "hidden" beyond the edge
Click and Shooter Game
By dlamc, with 1 reply.
Replied to by danpost, almost 10 years ago:
If you do not want the bullets to change directions when an arrow key is pressed, then you should remove lines 3 through 18 in your bullet code above. It
might
work if those lines were in the constructor of the class; however, it would probably be best to set the rotation of the bullet when it is created. Unfortunately, you did not give enough Tank class code to allow anyone to help you fix it there.
Score problems
By cesararp10, with 2 replies.
Last reply by cesararp10, almost 10 years ago:
thank you so much ... worked great!!
Spawning an object to a particular side of another object?
By cmdshepard, with 6 replies.
Last reply by cmdshepard, almost 10 years ago:
alright, cheers again chaps
Greenfoot is reading setImage() but is not setting the image?
By SloanTheSloth, with 1 reply.
Replied to by danpost, almost 10 years ago:
It looks like your instruction pointer is at the 'setImage' line (where it has not executed yet). However, there is a very easy way to accomplish what you are trying: <Code Omitted>
Sound starts playing despite using !isPlaying
By Saberdeer, with 2 replies.
Last reply by Saberdeer, almost 10 years ago:
Aaaand I feel dumb. Yeah, that fixed it. Thank you!
need to understand this error
By divinity, with 2 replies.
Last reply by divinity, almost 10 years ago:
thank you danpost, didnt even see and noticed that. thanks a lot
Help with moving an object?
By Astralman, with 5 replies.
Last reply by Super_Hippo, almost 10 years ago:
This could work: <Code Omitted>
Heapspace error occurred,Greenfoot crashed, now won't initialize correctly
By JWK3986, with 1 reply.
Replied to by JWK3986, almost 10 years ago:
Never mind I may have found a fix by resetting the images assigned to each actor by right clicking and choosing set image.
Can't jump
By Jochends, with 6 replies.
Last reply by Jochends, almost 10 years ago:
Omg i found my big mistake.. It's maybe good to share this with others.. I found a platform(ground) image where he stands on and made it transparant( because it had a white background ). But their was still a few inches of transparency above the ground that i didnt cut in my program. So he was just standing on the 'invisble' part of that image. Thanks anyway for the improvement of my code
Creating Buttons?
By rn42v1r, with 6 replies.
Last reply by rn42v1r, almost 10 years ago:
Thank you very much, it's working :D
getObjects(Actor.class);
By ZoeF, with 7 replies.
Last reply by danpost, almost 10 years ago:
ZoeF wrote...
I wil give this idee a go and keep you updated if i have any issues with it.
You will have one, unless you change the access modifier of the list from 'private' to 'public'.
turntowards but image not facing correct way
By ZoeF, with 4 replies.
Last reply by ZoeF, almost 10 years ago:
Yep did just that. Tnx anyway.
Tips before attempting a large project?
By alittle_bit, with 1 reply.
Replied to by danpost, almost 10 years ago:
If you already know what you want overall, I suggest you create a game plan before writing any codes. For a decent full-fledged project, you could have a header screen, menu world, maps for levels, possibly with scrolling and/or smooth moving -- whatever. I usually start with whatever is first -- like the header screen. Then, move on to maybe the menu with button options for 'play', 'exit', 'credits', and 'controls'. One thing I would not do is create four separate classes for each of the option; but use one class to create the different option actors. Let the menu world retain references
429
430
431
432
433
434
435
X