Sign Up, Lost Password
You need to login to take part
Saving the caracter
By Guy68, with 4 replies.
Last reply by Guy68, about 6 hours ago:
What is static field? How can i save the player in that?
By Wiwhyweirdo, with 2 replies.
Last reply by danpost, about 17 hours ago:
After some more testing I have noticed that whenever I receive damage the game speeds up at gets less laggy. Do what you want with this Information .
You might be doing something with images that is causing the lag issue. Make sure you pre-load your images. Make sure you always reference those pre-loaded images when setting an image. Keep your world at a reasonable size. I stick to not much more than (900, 600) world size (depending on the scenario). If using an unbounded world, make sure all actors are removed from the world after they leave the viewport
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, 5 days ago:
Thank you, now it works
How to detect if all objects are gone
By Psg, with 11 replies.
Last reply by danpost, 7 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
How to stop actors from "sliding" after calling the move() function and changing orientation
By TheGrrMan, with 5 replies.
Last reply by danpost, 9 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, 10 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, 10 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, 12 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, 14 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, 15 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, 15 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, 15 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, 18 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, 19 days ago:
I do not have a code yet because I do not know where to start