So I'm trying to make a bomb explode (with the setImage method) before it disappears, but it doesn't. is there a way to delay the line of code removing the bomb from the world?
So I'm trying to make a bomb explode (with the setImage method) before it disappears, but it doesn't. is there a way to delay the line of code removing the bomb from the world?
What you should do is create a different actor for the explosion. Add it into the world just before removing the bomb at the bombs location.
So I'm trying to make a bomb explode (with the setImage method) before it disappears, but it doesn't. is there a way to delay the line of code removing the bomb from the world?
What you should do is create a different actor for the explosion. Add it into the world just before removing the bomb at the bombs location.
But how would I create it where the bomb last was, and at the right time? is there a getPosition method? does that exist? I'm very new to greenfoot, so I have pretty much NO idea what I'm doing.
But how would I create it where the bomb last was, and at the right time? is there a getPosition method? does that exist? I'm very new to greenfoot, so I have pretty much NO idea what I'm doing.
I wrote:
Add it into the world just before removing the bomb at the bombs location.
Where are you removing the bomb? In the Bomb class. The bomb's location is quite accessible there also.
I found out another solution, but it now disables the feature that removes the bomb when it runs out of life out goes off the edge of the world. all it does is changes the image, I have no idea why it would make the bomb exist longer