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
types
By Nosson1459, with 1 reply.
Replied to by danpost, about 9 years ago:
Nosson1459 wrote...
<Code Omitted>This code worked and then in middle of nowhere it said incompatible types actor cannot be converted to Box. Why not and why did it work before, when I didn't change anything, and I can't change the "Box box" to "Actor box" because then I cant access "isThere" .
You just need to let the compiler know that the returned object of 'getOneObjectAtOffset' is indeed a Box object. The method is designed to return an Actor
Side-scrolling
By Nosson1459, with 9 replies.
Last reply by danpost, about 9 years ago:
Nosson1459 wrote...
How do you set where you can, and can't see?
What kind of side-scroller are you trying to create -- one that scrolls continuously regardless of any actor in the world or one that follows a specific actor? I will presume that this is for your Pengu project, in which case it follows an actor and scrolling occurs when the actor has passed a specific limit toward the right only. That is, no matter how far pengu is allowed left, no scrolling will occur (pengu would just be limited to some nominal x-coordinate value). So, anytime the world "sees" that pengu is on the ri
Help with Math.Pow and doubles.
By Chip, with 3 replies.
Last reply by Chip, about 9 years ago:
Cheers for your help guys , sorry I didn't replay sooner, I was away for the weekend :)
font
By Nosson1459, with 1 reply.
Replied to by danpost, about 9 years ago:
Nosson1459 wrote...
how do I set a font other than the reg. greenfoot one??
You cannot programmatically change the font used by the World class method 'showText' or the GreenfootImage constructor 'GreenfootImage(String, int, Color, Color)'. However, my
TextImage Support Class
scenario can be studied or the TextImage class from it can be used directly to create TextImage objects (which ARE GreenfootImage objects) when the class is included in your project.
nullPointerException
By Nosson1459, with 4 replies.
Last reply by Nosson1459, about 9 years ago:
thnx
move
By Nosson1459, with 3 replies.
Last reply by danpost, about 9 years ago:
Nosson1459 wrote...
but I want it to door 2 override move that is if door ==true and x>342 move should = false
Then change line 50 of the Pengu class to this: <Code Omitted>
Switch to the hitting animation and back to normal
By theotherroom, with 2 replies.
Last reply by theotherroom, about 9 years ago:
Thank you, it worked!
Trying to display points on actor
By JonnyB7, with 1 reply.
Replied to by danpost, about 9 years ago:
Try replacing line 36 of the Goldfish class with this: <Code Omitted>
Trying to use a list to affect pears when my block hits a world edge
By JWK3986, with 7 replies.
Last reply by JWK3986, about 9 years ago:
ok, everything executed properly when I added "pear." in the appropriate spots. Thanks a lot for the help.
Please help with java.lang.IllegalStateException: Actor not in world. An attempt was made to use the actor's location while it is not in the world. Either it has not yet been inserted, or it has been removed.
By powderbanana, with 1 reply.
Replied to by danpost, about 9 years ago:
After line 26 in the Balloon class (where you are removing the balloon from the world), add a 'return;' statement so execution of further statements in the method are not attempted.
Need Help With My Pong Inspired Game
By Frost.D, with 8 replies.
Last reply by danpost, about 9 years ago:
I was thinking of something more along these lines (this is not equivalent to your new code as you have made some major changes):
wats this
By Nosson1459, with 1 reply.
Replied to by danpost, about 9 years ago:
Nosson1459 wrote...
<Code Omitted>wat does this code mean and how can i change the speed
It depends on the context that it is being used. Will need to see the method that line is in plus the RunWorld class code (at least).
how can i remove an object when i click on something from another world
By hockeydude1155, with 2 replies.
Last reply by danpost, about 9 years ago:
If you had the Hero2 object reference in an instance field and a method to return that Hero2 object in the City class: <Code Omitted>then you could remove it specifically with: <Code Omitted>
Delay a single object
By Idadorable, with 3 replies.
Last reply by danpost, about 9 years ago:
Idadorable wrote...
Thank you!
I guess that the 'if' statements can be combined as follows: <Code Omitted>
Problem with mouseclick event
By chandra, with 1 reply.
Replied to by danpost, about 9 years ago:
Your mouseClick needs to be on the actor, not on the image. Use 'this' to refer to the actor the act method is executing for. I do not believe you need to reset the image to the actor (your last code line).
429
430
431
432
433
434
435
X