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 can I make an enemy "lose health" when an arrow hits it?
By Yongjoon, with 25 replies.
Last reply by Yongjoon, over 11 years ago:
Thanks a bunch. The arrow hits, vanishes, and damages the minion. Thanks! ^^
Quick concern
By landry, with 1 reply.
Replied to by danpost, over 11 years ago:
Eliminate some large images or sound files.
help?
By programmer22, with 1 reply.
Replied to by FlyingRabidUnicornPig, over 11 years ago:
I refuse.
Grabbing Location of Actor from another Actor
By programmer274, with 3 replies.
Last reply by programmer274, over 11 years ago:
wait never mind i think i can get it to work a different way. Thank You for the help
Creating health for an object
By Neon147, with 6 replies.
Last reply by Neon147, over 11 years ago:
Ahh yes i see that now, thanks ill change the name
Setting an own font?
By Solringolt, with 8 replies.
Last reply by danpost, over 11 years ago:
You can import the Font class and then drawString text to images after 'setFont'. Example follows: <Code Omitted>
dog world help
By gyrlonfilm, with 4 replies.
Last reply by gyrlonfilm, over 11 years ago:
Got it! Thanks!
Making enemies bounce off walls
By Neon147, with 6 replies.
Last reply by Neon147, over 11 years ago:
Ahhh okay it worked, thanks alot you two!
Donkey Kong Game barrel Srimulation
By toscany, with 1 reply.
Replied to by FlyingRabidUnicornPig, over 11 years ago:
Your code just doesn't work. What you're trying to do is delay the barrel, but your causing a "delay" that happens in a time before the program even renders everything. If you ever want a delay that lasts a couple of frames, never put it in a while statement. That while statement happens before a single frame is rendered. What you need to do is have an int that will keep track of the time since it last fired (by subtracting 1 from itself every frame), then have a method that will return true if that counter is 0. When the barrel fires, you tell the counter to go back to 50. So I would have
Rendering in Greenfoot
By Game/maniac, with 1 reply.
Replied to by danpost, over 11 years ago:
How about changing its image to 'new GreenfootImage(1, 1)'. I do not think that changing alpha to zero would help much, or at least noticeably, if at all. The system would still have to iterate through all the pixels, regardless.
Movement?
By Jin-Ho, with 1 reply.
Replied to by Gevater_Tod4711, over 11 years ago:
If you got a stop method you can use it but it would be easyer just not to move. So if you object touches another object you don't execute the move method: <Code Omitted>
Why does this not work
By Game/maniac, with 5 replies.
Last reply by Game/maniac, over 11 years ago:
thank you it works now
A charging ennemy
By Solringolt, with 4 replies.
Last reply by Solringolt, over 11 years ago:
I wanted to change the distance for y but your code helped me to do it ;) Thx for everything, I get it working.
Checking if in world
By FCG, with 3 replies.
Last reply by Gevater_Tod4711, over 11 years ago:
<Code Omitted>
How can I do it...
By Miikku, with 6 replies.
Last reply by Kartoffelbrot, over 11 years ago:
<Code Omitted>If this code shouldn't be in the soldier class, say it.
825
826
827
828
829
830
831
X