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
Arduino
By Alexlife2002003, with no replies.
ino.sendData so that command i use to send data to arduino but how do i tell arduino to stop?
How do I spawn objects at random locations without risking that they spawn into each other?
By DML, with 1 reply.
Replied to by danpost, over 6 years ago:
DML wrote...
<< Code Omitted >> In lines 3-12, I defined some stuff that I need for the if-expressions that come later, but unfortunately, I can´t use getX or getY as the objects haven´t been added to the world yet. Adding the content of lines 3-12 into the if-expression would be too late because I need schatzX, schatzY, wandX and wandY for starting the if-expressions in the first place. Do you have any ideas how to fix this problem?
If this is a grid world (cell size not pixel-sized), then you could just make use of the
getObjectsAt
method as you add the actors into the world.
I need to communicate two clases
By SuperAmigo300, with 4 replies.
Last reply by danpost, over 6 years ago:
SuperAmigo300 wrote...
The codes are above.
You gave your world class codes twice and omitted your Boss class codes.
Gravitation-Simulator
By YuEmAydin, with 2 replies.
Last reply by YuEmAydin, over 6 years ago:
God damn... Thanks for the answer it was very helpful.
A question about snapping an object to another object
By Monserus, with 1 reply.
Replied to by danpost, over 6 years ago:
Monserus wrote...
Right now you're able to drag a ship to the field (the tiles where you play on). The problem is, that you're also able to put a ship between multiple tiles (e.g. putting a 2-tile ship in the middle of 4 tiles, which makes it 4 tiles large). A solution to this would be to make ships automatically snap to the tiles where their (mostly) located at. I wanted to know if thats even possible and if so, a short explanation would be really nice.
I will try to explain as best I can. First, let's define a ship of length 2 or 4 to be an even ship and one of length 3 or 5 to b
I have a problem!... pls help me(infinity loop)
By Felix123, with 7 replies.
Last reply by Felix123, over 6 years ago:
OK thx
How do I interrupt a loop after a certain amount of actors have appeared?
By DML, with 2 replies.
Last reply by DML, over 6 years ago:
Thank you :) Now it works.
Wie unterbreche ich eine Schleife, nachdem eine bestimmte Anzahl Actors vertreten ist?
By DML, with 2 replies.
Last reply by DML, over 6 years ago:
Danke :) Jetzt funktioniert es.
Do not spawn bullet
By greenfootUser343, with 2 replies.
Last reply by greenfootUser343, over 6 years ago:
Thank you Dan, that worked perfectly.
Bee production
By Phoenix36, with 3 replies.
Last reply by Super_Hippo, over 6 years ago:
Yes, the beeTimer can be read as "how many turns before the next bee should be placed into the world". At the beginning, it is set to 400 for the "do nothing" part and then it is used as the random time between.
Actor lost after compile
By schoolLady, with 2 replies.
Last reply by schoolLady, over 6 years ago:
Thank you! Your answer is a good start for my day, after my coffee! :)
accesor
By destroyer9909, with 3 replies.
Last reply by danpost, over 6 years ago:
destroyer9909 wrote...
So I don't need the accessor anymore?
If that was the only reason for having it, then I guess not. Also, I cannot come up with any possible reason for needing it.
Compiling problem.
By Aftermath, with 4 replies.
Last reply by Aftermath, over 6 years ago:
nccb wrote...
Taking a quick look at the old code, this may occur when Greenfoot fails to find the last world class to save the world to. I'm not totally sure what would have caused this, but try manually creating a new world after loading a project, then do the save the world actions.
That worked, thank you!
Counter Issue
By greenfootUser343, with 2 replies.
Last reply by greenfootUser343, over 6 years ago:
Thank you, that resolved the issue.
Making an object spawn randomly within a certain area
By DanB1995, with 5 replies.
Last reply by danpost, over 6 years ago:
DanB1995 wrote...
I honestly don't understand it, from my perspective it seems like you're just talking about the car..
Don't fret -- the steps are the same for any object.
228
229
230
231
232
233
234
X