Sign Up, Lost Password
You need to login to take part
Greenfoot scenario freezing in browser
By epm, with no replies.
Hey, I tried to share my scenario but it keeps initialising. After a long time it loads but when changing the world it start freezing again. I really don't know why :( It is working in Greenfoot. You can find my scenario
How to reset a World while the Program is running?
By Bankspeers, with 5 replies.
Last reply by Bankspeers, 2 days ago:
Thank you, now it works
How to detect if all objects are gone
By Psg, with 11 replies.
Last reply by danpost, 4 days ago:
hey, dan I need your help. I have a problem. I believe this if statement is working, but reading the wrong value of the integer rotate. What should i do
First, you should understand that the rotation is already being held in the Actor class, meaning you do not need to declare another field for it. You could use something like the following: <Code Omitted> It is not really clear by your code as to exactly what you are trying to achieve with the turn methods Obviously, you want the crab to turn sharp at an edge, whic
Saving the caracter
By Guy68, with 1 reply.
Replied to by danpost, 5 days ago:
i have two characters and i have levels games. after playing a certain level, I would like to continue the game with the same character, but it does not save the character. What can be done? anyone have an idea?
Just move the character into the new level. Do not create a new one. For example: Create next level world with (I am using
as the new level world and
as the character in question); <Code Omitted> with constructor in
How to stop actors from "sliding" after calling the move() function and changing orientation
By TheGrrMan, with 5 replies.
Last reply by danpost, 6 days ago:
your QActor class, how do I access this?
It can be found in my
Asteroids w/Improved QActor class
scenario. Again, it is not to be modified in any way -- just used as is. Download the scenario and open in greenfoot. Then, you can copy/paste the class into your scenario. It does work differently than the
class, however. Open the class and read through the instructions carefully.
subclasses requiring it should extend the
How do you rotate an object to spawn in a different way?
By zlm, with 2 replies.
Last reply by zlm, 7 days ago:
Yes, thank you so much!
How do you make an object move along with another object
By jeremyneedshelp, with 1 reply.
Replied to by danpost, 7 days ago:
I cannot make my frog to move along with the boat that allow the frog to cross the river. i managed to get the frog to go on top of the boat but it wouldnt move at all. it would just get stuck on the boat and it would die.
You need to show your current codes for both the frog and the boat. Also, you can look at other codes that do similar things. For example, my
Jump and Run Demo w/Moving Platform
scenario has an independently moving actor moving on a platform.
Adding a method to superclass Actor directly
By ChristophT, with 2 replies.
Last reply by ChristophT, 9 days ago:
Thank you for your reply. At least I am not going to waste my time then. To bad, I can't do that however.
Gradually decrease and increasing speed
By lightbringer, with 4 replies.
Last reply by danpost, 11 days ago:
cap out in a particular value
<Code Omitted> or <Code Omitted>
Need to execute sound.stop() once a sound has played through once
By lilnasX, with 1 reply.
Replied to by danpost, 12 days ago:
I want the class to play through the wasted sound once, and then once it has finished playing play the gameOverBGM sound in a loop. However, the if statements condition is never met and the gameOverBGM line is never reached. I can't just input wasted.stop() after wasted.play otherwise the sound will not play through once and it will immediately play my gameOverBGM. need some advice, thanks. << Code Omitted >>
You cannot track the progress of the sound from the constructor of the class. Use the
method for this control. Also, line 22 is a bit redundant. T
Getting Neighbours with Certain Traits?
By Foofoo99, with 7 replies.
Last reply by Foofoo99, 12 days ago:
Thank you so so much danpost! You have worked wonders in the progression of my remake of Stratego and I wish you a good night. I will try to let you know when the game is done.
Remove an Object when actor touches another object
By beaverboii, with 1 reply.
Replied to by danpost, 12 days ago:
I want to remove a block when the main actor touches another block to open up a secret gateway in my game. Been trying to figure out how to do this for 4 class periods but my teacher and I don't know how to do it and the 15 yr old tutorials on YouTube don't help.
Best would probably be to have an
reference field in the
class (or a special subclass of
) to hold the
object that special
object is to remove. That way, when touched, it will know which one to remove.
Sending Information from one Actor to another
By Mordanto, with 1 reply.
Replied to by danpost, 15 days ago:
I want to create an explosion by changing an image in the missile, but the "Gegner" checks whether the missile has hit him or not. I have done this because the Gegner's hp is deducted for this. But now I have to somehow tell the rocket to change its magic. << Code Omitted >>
The following will call a
method that you can put in the
class: <Code Omitted>
Multiple constructor help
By KevinNavarro, with 1 reply.
Replied to by KevinNavarro, 16 days ago:
I do not have a code yet because I do not know where to start
How can I make my stride program check if the answer is right?
By D0dZi3, with 1 reply.
Replied to by danpost, 16 days ago:
Hey all, I am making for class a stride scenario program and I am trying to figure out how to make the program check if the answer is right or not and for it to output correct or false. Any help would be really appreciated
Will need to see your current codes to help.