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
Referring to another Actor's variables
By EggsD, with 5 replies.
Last reply by danpost, about 11 years ago:
You are trying to have the timer run inside the 'shieldAnimation' method; but, it is only called when the 'getShield' method detects that the actor is touching a Shield object.
Limiting enemy spawns
By Larez, with 5 replies.
Last reply by Larez, about 11 years ago:
Finally! Thank you for the help. :D
Ammo, Stop shooting after 15 shots until ammoPickup
By BroTolo, with 9 replies.
Last reply by danpost, about 11 years ago:
BroTolo wrote...
Another thing, How can i get the bullet to be removed once it hits the enemy? It seems to error. It works as the code is, but when i got to add getWorld().removeObject(this); Right under the removing of the enemy, it then errors. I do NOT want the bullet able to keep on flying through the rest of the zombies < Code Omitted >
If you add that line, you will then be calling two methods ("Damage' and 'Remove' ) back to back that both can remove the bullet from the world. If the first one called removes the bullet, the second one cannot be allowed to execute as bot
GreenfootImage Troubles
By DogeOverlord, with 4 replies.
Last reply by DogeOverlord, about 11 years ago:
After playing around with it a bit with an image size of 600 by 400 (Size of the world) I discovered that the drawString coordinates are relative to the top left of the GreenfootImage, so I adjusted it and got it working. Also Textbox is an actor, not a world. Background refers to the background of the textbox. EDIT: And of course if I had looked at the documentation closer I would have known that...
plug in
By lwittman1, with 1 reply.
Replied to by danpost, about 11 years ago:
What do you want to do? just view some of the scenarios uploaded to this site by other users? or, do you want to download the greenfoot IDE so you can program with it?
Cant touch object
By madflac, with 1 reply.
Replied to by danpost, about 11 years ago:
My 'moveHorizontally' and 'moveVertically' methods keep the actor from touching any others. You cannot expect that it is touching a Key object after executing those methods (or anywhere outside those methods). Instead of calling 'teleport' from the act method, call it from within both the other methods before moving back off any intersecting objects.
Bouncing opposite direction when the ball hits the worlds edge.
By chamuzi3, with 18 replies.
Last reply by danpost, about 11 years ago:
You should start a new discussion thread -- not continue one that expired over a year ago. Also, your issue deals with movement; but, I do not see any codes related to the movement of the actor. Please read the info linked to the 'Posting code? read this!' link below the reply box before posting any more codes.
2D ARRAY GENERATION
By ArchMageGaming, with 2 replies.
Last reply by ArchMageGaming, about 11 years ago:
thank you i'll check it out
I need help creating a tail for the snake any ideas? I want it to add onto the snake once it eats food.
By T-rent, with 5 replies.
Last reply by AndrewCZ, about 11 years ago:
Yes, the snake moves every time the act() method is called. Btw, the "check it out" part was aimed at T-rent :P
hi my name is alexandar924 i need help with my code i am trying to get my actor to power up when he shoots a power falling down with the enemy i need the code for it so that when my actor hits that power up his speed of his shooting increases please help.
By alexandar924, with 1 reply.
Replied to by danpost, about 11 years ago:
Cannot help fix non-existent code. Post required codes when asking for help. Please read the page linked to 'Posting code? read this!' below the reply box before posting any codes.
how to make menu and highscore screen?
By AngelusNeko13, with 4 replies.
Last reply by AngelusNeko13, about 11 years ago:
hmmmm okay i kinda get that buuut im a bit confused, im so sorry im a complete beginner at this :(
How do I counters increase through time?
By AngelusNeko13, with 2 replies.
Last reply by AngelusNeko13, about 11 years ago:
thanks super :) it helped alot
How to copy a actor to another world
By Skyus, with 1 reply.
Replied to by danpost, about 11 years ago:
The first line in your Portal class code creates a new HomeTown object. The 'prepare' method of the HomeTown class is executed at that time -- before you set mainCharacter of the Start world to mainCharacter of the HomeTown world. There are several ways to fix this. Now that you know why it is not being found; see if you can think of a way to correct the order of events (creation of the HomeTown object, the setting of the mainCharacter and the adding of it into the HomeTown world). I will give you this, the mainCharacter of the HomeTown object must be set either in the constructor, before
How do I make traffic collide?
By AngelusNeko13, with 6 replies.
Last reply by AngelusNeko13, about 11 years ago:
hey nvm i got it :) but thank you all so much this really helps for obstacles like trees, road signs. etc. but really thank you all
Make the lighthouses move up and down continuously.
By grimancepizza, with 4 replies.
Last reply by AngelusNeko13, about 11 years ago:
btw the car is the character you control and the vehicle class is the traffic
532
533
534
535
536
537
538
X