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
Checking if something is in the way
By CodeTime, with 1 reply.
Replied to by danpost, over 7 years ago:
Possible things you could try are: (1) use a for loop to move the actor one square at a time toward its destination, checking for collision at each square; (2) add an object the stretches between the origin and destination squares, not including the two squares and ensure it has no intersecting objects; (3) represent the position of the board in an array and iterate between the two positions looking for a non-empty position; There are probably other ways as well, but one of these should work for you.
Having better collision detection
By Notted, with 5 replies.
Last reply by Notted, over 7 years ago:
Code for detection: <Code Omitted>
Give points when cursor clicks on object.
By rycode, with 11 replies.
Last reply by danpost, over 7 years ago:
rycode wrote...
So, I think the score might be working, but I need to show it on a counter.
Maybe you should take a look at my
Value Display Tutorial
scenario.
Question with code (keydown)
By CodeTime, with 2 replies.
Last reply by CodeTime, over 7 years ago:
danpost I am not sure why you have wait set to 2 after moving the actor, as setting it to zero would seem more appropriate.[/quote wrote...
This is late but thank you very much for the help. To answer your question, this is because soon after, I was planning for another function to run if wait was set to 2, but did not get to it as I had a problem with the part that I posted.
MOVE ACTOR DOWN CONTINOUSLY UNTIL IT HIT ANOTHER ACTOR THEN STOP
By gdrgnxxi, with 1 reply.
Replied to by danpost, over 7 years ago:
<Code Omitted>
Adding numbers to an arrays content
By n1ght5t41xX, with 2 replies.
Last reply by n1ght5t41xX, over 7 years ago:
danpost wrote...
If I understand correctly, at the end, the sum of all elements will be 100. Remove the '+1' from line 8 and use one of the following for line 9: <Code Omitted>
thank you. have a nice day
Please help with picking random set location
By N0way, with 6 replies.
Last reply by danpost, over 7 years ago:
Sorry. Line 8 should be: <Code Omitted>
How to randomly spawn a new item once
By fuongbregas, with 4 replies.
Last reply by danpost, over 7 years ago:
You just need to drop eggs at random times (not all the time).
How do you let an object follow another object?
By Mathiiii, with 2 replies.
Last reply by Mathiiii, over 7 years ago:
Thanks!
how do I put game completed screen after my car eat all the coins in circular track
By hd3377, with 3 replies.
Last reply by hd3377, over 7 years ago:
Super_Hippo it worked finally.Thanks a lot.
MAKE ACTORS MOVE IN THE ORDER I WANT
By gdrgnxxi, with 4 replies.
Last reply by danpost, over 7 years ago:
gdrgnxxi wrote...
all actors move at the same time.
Maybe you should have your world deal with the key presses and inform the "current" ingredient how to respond. This would most probably require that you have a list or array of the ingredients to iterate through as the key presses are detected.
Making a win or lose state.
By Notted, with 21 replies.
Last reply by danpost, over 7 years ago:
Notted wrote...
It works! So the problem was with the way it was spawning in?
Yes. You had the actor spawning in, but the field,
thePlayer
, was not being set to that actor. My first line applies the assignment and my second one adds that (same) actor into the world.
Need help, whenever frog eats fly, score goes up 1
By joeyjin_, with 7 replies.
Last reply by danpost, over 7 years ago:
Nosson1459 wrote...
did you put any code for the fly after it was removed? because the remove must be the last thing you use the fly for
The removal was probably from something executed just prior to this code.
Quick question concerning a for loop
By n1ght5t41xX, with 1 reply.
Replied to by n1ght5t41xX, over 7 years ago:
Solved it myself - I forgot to put a delay into it. Still leaving this here for education purposes haha
I need help making a Boss player automatically fire a laser in a greenfoot game I created called SuperBros
By ak02, with 2 replies.
Last reply by ak02, over 7 years ago:
Thank you.
194
195
196
197
198
199
200
X