This site requires JavaScript, please enable it in your browser!
Greenfoot back

SamSkinner's Comments

Back to SamSkinner's profile

public void deleteBullet(Actor actor){ removeObject(actor); return; } I changed it to that. Sadly it still happens. :(
Urghh. Once bullet hit the guard it popped up with terminal error. Guard disappeared but bullet stayed and the error was saying stuff about:: The actor has not been inserted into the world so it has no location yet. You might want to look at the method addedToWorld on the actor class.
@Lilpowerdude, thanks for the delay code, worked perfectly and so simple. Awesome. :) The problem I am having with deleting the bullet is that I'm not sure what to do with the remove codes that I have. public void checkBullet(){ if(canSee(Bulletleft.class)||canSee(Bulletright.class)){ ((Archerworld)getWorld()).deleteGuard(this); ((Archerworld)getWorld()).deleteBullet(Bullet.class); } } That is what I have in the Guard1 class. public void deleteBullet(Actor actor){ removeObject(actor); } That is the method in the world. The problem is that the deleteBullet line in Guard1 doesn't know which bullet to delete. I got the bullets to delete when they touch the edges by simply putting: public void delete(){ if(getX()>=690||getX()<=10){ ((Archerworld)getWorld()).deleteBullet(this); } } That in the Bullet class.
Thank you very much. :) Oops, I keep meaning to uncheck that. I will once I update.
Hm, I think that is because it only detects blocks and lets you jump if your center is in line with the block. I'm not sure though, I'll try and figure it out. I'm glad it's not too hard or too easy. :)
Pretty hard how? Once I've finished I will, but I still need to work on the game part of it.
Hm. That's a good idea. I think I could try and do that. :) You're right, I guess the only factor that applies is that it is based on paper, hah. If you can think of a specific idea for a multi-step, not too difficult to make level I'll try and put it in.
Congrats. :) Yeah, I am. I need some ideas for tricky levels though, any ideas? And what do you mean by multiple steps?
Told you it was possible. :D