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
Sum of array
By Super_Hippo, with 3 replies.
Last reply by danpost, about 8 years ago:
Actually, the binary equivalent to 0.4 above was incorrect; but, my point still holds. The correct binary value should be 0.0110... with the fractional part repeating.
Counters not working
By Kordus, with 5 replies.
Last reply by danpost, about 8 years ago:
'Counter' is a class name -- it does not refer to a particular Counter object. You need a reference to the particular Counter object whose value needs adjusting there. Insufficient code given to help in this respect.
Bullet direction
By Azzzy24544, with 1 reply.
Replied to by danpost, about 8 years ago:
I think the easiest way is to set it by the actor that creates it: <Code Omitted>
Help with one.setLocation(one.getX()+x2,one.getY()+y2); and List<Statment> everyone = getWorld().getObjects(Statment.class);
By Djolex, with 1 reply.
Replied to by danpost, about 8 years ago:
If this deals with scrolling, maybe this will be answered by the scrolling tutorial linked to your other discussion thread. (better to let the actor move and have the world adjust everything depending of what limitation you place on the actors location)
Scrolling man
By Djolex, with 1 reply.
Replied to by danpost, about 8 years ago:
See my
Scrolling Tutorial
scenario.
Does using inheritance slow down performance?
By SuperNinja, with 1 reply.
Replied to by danpost, about 8 years ago:
You will need to show what codes you are using to determine what the cause of your "unresponsiveness" is due to. It actually might be best to upload the project while making the source available so that iit can be properly diagnosed in a much more timely fashion.
Removing an item that was never touched
By Echarch11, with 7 replies.
Last reply by davmac, about 8 years ago:
일리아스 wrote...
I did the logic and im quite sure it works.
It should work with the current version of Greenfoot, provided you haven't called the World's setActorOrder(...) or setPaintOrder(...) methods. If you have used either of those methods (with an ordering), I think it won't work. (And as you've discussed already, it might not work in future Greenfoot versions).
Rotations from a point
By Echarch11, with 6 replies.
Last reply by danpost, about 8 years ago:
Actually, I meant this: <Code Omitted>The documentation shows the constructor used to create an image of a specified size, plus the methods to get the width and height of an image and the method to draw an image onto another one. A cursory glance over the documentation would lead to most, if not all, of these. Like I said, my first post basically said it all, draw (line 3) the image (line 1) at (0, 0) (again, line 3) on
Shooting a bullet
By Echarch11, with 8 replies.
Last reply by xbLank, about 8 years ago:
This is correct. Thank you. Edited.
Can somebody please explain me this code
By menshave, with 7 replies.
Last reply by danpost, about 8 years ago:
menshave wrote...
explain me what if(Greenfoot.mouseMoved(null)) means.
It asks if the mouse has moved. If it has, then a MouseInfo object is accessible, Since the location of the mouse is crucial here, this is the correct method to use for that determination. The MouseInfo object, in turn will contain the new location of the mouse.
what is targetx and y on the method move(). Is it the coordinate from the mouse?
Initially, it is the location of the actor (via the 'addedToWorrld' method). Once movement of the mouse is detected and from then on, it is the last known l
No object image
By ImAndrew, with 12 replies.
Last reply by ImAndrew, about 8 years ago:
danpost wrote...
ImAndrew wrote...
I don't get why using two getKey will not work.
You would have to understand the way the keyboard buffer works. Keystrokes are placed in an array with a pointer to the next key to be retrieved. When getting a key, the pointer is adjusted so the next key is ready to be returned on the next get. If this did not happen, the same key would be returned indefinitely.
Okay, now it's a little more clear, thanks, you saved my game a few times and learned me a lot of things xD
Rotation from a point that is not the middle
By Echarch11, with 3 replies.
Last reply by danpost, about 8 years ago:
nolttr21 wrote...
where?
Here.
It does not supply actual code; but, it does describe exactly what the code should do.
Can someone make me a game pls for my assignment its due next week?
By Tyleroneil72, with 9 replies.
Last reply by Santos_Hernandez, about 8 years ago:
Fine give me the pesos after, i can get u the game by next friday
I just wanna spawn one ball
By Sarwa35, with 5 replies.
Last reply by Sarwa35, about 8 years ago:
I got it but thanks for trying to help me
How to make enemies fire act main actor
By Lunatale, with 2 replies.
Last reply by xbLank, about 8 years ago:
I do not clearly understand your problem. Its common sense. You want an actor to shoot at another. So you know you need your actor2 to locate actor1 and shoot in that direction. Thats why I want you guys to
provide some code.
296
297
298
299
300
301
302
X