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
Actor not in world
By SeafodHalal, with 2 replies.
Last reply by danpost, over 4 years ago:
In
Projectile
class, remove any collision with
Enemy
object code.
How can I make my background scroll left and right?
By Samuaelk, with 3 replies.
Last reply by Samuaelk, over 4 years ago:
Thanks!
How to register when left and right mouse buttons are clicked at the same time?
By RoverKnight, with 1 reply.
Replied to by danpost, over 4 years ago:
Add an
int
field to track buttons down. Increase by (button value plus one) divided by two on mouse presses and decrease by same on mouse clicks. Only perform action for both buttons down when its value is three. One thing to note: although not very likely, it is possible for both buttons to perform an action during the same act cycle, which may throw your count off. Increasing the scenario speed will help in minimizing that possibility. Limiting the value of the field to between zero and three on any change in its value would also help to rectify it when it does go off value.
Sound issue in Greenfoot
By m84ef, with 1 reply.
Replied to by danpost, over 4 years ago:
m84ef wrote...
my code works fine (up to now). I wrote a code, so music plays when I press the level1-button, but the sound starts when I click the back-button and the sound is laging
Please provide
Level1
class codes.
How do I make actor disappear after touching another actor.
By ExistingProof, with 1 reply.
Replied to by danpost, over 4 years ago:
The only
Actor
class method that can remove an object from the world is the
removeTouching(Class)
method.
How do I make actors randomly generated on the screen infinitely?
By ExistingProof, with 1 reply.
Replied to by danpost, over 4 years ago:
Add
Cloud
objects from an
act
method in your
MyWorld
class (it is a
World
method that is repeatedly called by greenfoot while your scenario is running).
Test
By User7881818, with 3 replies.
Last reply by User7881818, over 4 years ago:
Vraag 3 Wolf class: import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) /** * Write a description of class wolf here. * * @author (your name) * @version (a version number or a date) */ public class wolf extends LittleRedCap { private int marge=90; private int randomWalk = 5; public void act() { move(10); turnAtEdge(); walkRandom(); eatLittleRedCap(); } /** * turns the wolf unpredictable at the edge in another rotation. * * */ public void turnAtEdge() { int min=0;
magikarp pokegameing
By magikarp2010, with no replies.
<Code Omitted>
magikarp kool code pokemopn
By magikarp2010, with no replies.
<Code Omitted>
How to get and delete an object that you click on?
By RoverKnight, with 2 replies.
Last reply by RoverKnight, over 4 years ago:
I implemented the code you wrote in the 2nd insert, and it works now. Thank you! I did put my original code in the cell covers act method, but forgot that I didn't need to then check which cell got clicked on... :,)
How i can disable auto-compile in greenfoot??? >.<
By leuveg, with 1 reply.
Replied to by rocket770, over 4 years ago:
Never had that issue on any school or personal computer. Are the computers actually at least decent? Is there an error with your code? I know sometimes when greenfoot spits out too many errors in the console it can crash. Anyway, saw
this
Enemies using walls to bounce shots
By Talrasha, with 5 replies.
Last reply by danpost, over 4 years ago:
Hull wrote...
Your code is a good, comprehensible implementation of the P(wall(x)|y) formula.
Maybe, but I found that bouncing off opposite side of wall was not being caught (as I first thought) with line 9. Better is: <Code Omitted>
What methods can a floating point/double be used in?
By CreatorMoon, with 4 replies.
Last reply by CreatorMoon, over 4 years ago:
Ah. My bad.
Check if objects of an actor are available
By meltHam, with 4 replies.
Last reply by meltHam, over 4 years ago:
<Code Omitted>Here's how I put that into my code and it works, thank you!
Actor should not spawn on top or close to another actor
By hernry2812, with 11 replies.
Last reply by hernry2812, over 4 years ago:
Doch, ist es ;) Aber so wie das aussieht muss ich es anscheinend mit einer Quelle angeben.
75
76
77
78
79
80
81
X