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 do i move up/down while replacing the sprite
By seandoesftw, with 1 reply.
Replied to by danpost, about 11 years ago:
I would first suggest not to have four different actors for one character. All you need to do is change the image of the character to one of the four images by using 'setImage' when a new direction is detected. As far as not being able to have your character change to a back sprite and move that way ... your 'charback' class would need posted as the problem is probably there. Please use the 'code' link below the 'Post a reply' box to insert your code into your future posts.
Java runtime envoirnment missing, and won't install.
By Entity1037, with 1 reply.
Replied to by lordhershey, about 11 years ago:
Is java disabled on the machine? The update button should only take you to the Oracle java page.
how do i do the tutorial
By cwfrock, with 1 reply.
Replied to by Entity1037, about 11 years ago:
You can't. You can ask a mod or admin to, though (although it's not like leaving this post here is a big deal).
Need Help With HealthBar by Sharing Variables
By BobFisher3, with 12 replies.
Last reply by BobFisher3, about 11 years ago:
No need, fixed it :D
I'm Korean User. But I can't compile on 2.4.0 version
By won0c, with 4 replies.
Last reply by davmac, about 11 years ago:
ps. Why is "bluej.vm.args=-Xincgc -Dawt.useSystemAAFontSettings=on" necessary? What is the purpose of this?
This is two settings: -Xincgc : use the incremental garbage collector, to try and reduce noticable pauses while Greenfoot is running -Dawt.useSystemAAFontSettings=on : forces text rendering to be anti-aliased. This is the one that seems to cause your problem, but it shouldn't. See
here
for documentation on this setting. If text is not anti-aliased, it generally looks much worse.
Code for a bouncing ball
By M.Hussain, with 3 replies.
Last reply by danpost, about 11 years ago:
You need to provide what code you have so far (at least as far as the ball and its ground/object detection). However, for gravity: <Code Omitted>
setColor won't work
By getreides, with 12 replies.
Last reply by getreides, about 11 years ago:
Wow, you never cease to amaze me :-). I will work on the code in the days to come; first of all, I will implement vector movement (that will make (3) superfluous - this was a somewhat awkward way to simulate gravity, and I kept trying various values until I got fed up with it and left line 30 the way it was at that moment).
Collision Detection
By Dab1001, with 2 replies.
Last reply by Dab1001, about 11 years ago:
Super_Hippo wrote...
<Code Omitted>But I am not sure if this will change anything. By the way, instead of your step by step, you could change line 44 and following to (and similar with the other ones).
Line of Sight for Enemies
By Inkflicker, with 1 reply.
Replied to by danpost, about 11 years ago:
Have an invisible sensor object created for each enemy (this can be done in the constructor of the enemy class with an instance field in the class to hold the sensor) that it can use to detect obstacles in the line of sight. Have the enemy add the sensor object anywhere into the world in the 'addedToWorld' method. In act method, if player is in world, then do the following for checking line of sight: * place sensor halfway between player and enemy; * size width of sensor image to distance between player and enemy (height of sensor image should be two); * rotate the sensor to the angle b
Making an array
By Dialglex, with 4 replies.
Last reply by gtogbes, about 11 years ago:
hi guys am a student programmer please iwl need every pint of your advice in order to be grounded thank you all
Delay function
By thepangolin, with 4 replies.
Last reply by Gamezocker, about 11 years ago:
ok
question on loading scenerios
By jsepecz1, with 1 reply.
Replied to by lordhershey, about 11 years ago:
The writer has to include the source with the scenario, it it not always available. When they do include it, you will see a button on the right side that will say, "Open in Greenfoot" this will download the project file to your pc.
Piano # key on UK keyboard
By edwright, with 3 replies.
Last reply by danpost, about 11 years ago:
edwright wrote...
Any more suggestions please?
You may just have to use a different key. Maybe jump up to the next row of keys.
Unwanted bouncing
By roeilthegreat, with 4 replies.
Last reply by danpost, about 11 years ago:
One thing that may be causing passage through ground objects is that when 'jump' is called 'fall' is executed; this is when you call 'checkKeys' from the 'act' method. However, you are calling 'fall' << again >> when you call 'checkFall' from the 'act' method. This will make your actor move double-speed when first leaving the ground.
Using the new showText() method
By edparrish, with 7 replies.
Last reply by danpost, about 11 years ago:
I created a subclass to GreenfootImage that will resolve your issue. Check
this
out.
657
658
659
660
661
662
663
X