Using BUMP, need a little help. Should be easy?
Posted: Tue May 19, 2015 2:53 am
Hi LÖVElies,
So I've been working on a game for a few weeks and and it has to have grown to the point where bump.lua might be the best collision manager for me. So lately I've been trying to update the code to make use of bump.
I've stripped down my code to help with testing/integrating this, so hopefully it can make sense to you. Right now the player character - the placeholder Crusader sprite - can walk around and bump into rectangles. If you hit the 'spacebar' key, it should generate a homing sprite that I would like to have destroyed on impact with the player character. That is, destroy the projectile, not the player character.
I can destroy the sprite if my crusader walks into the projectile, but if he/she stands still, the two will just slide up to each other, and the projectile will not destroy itself.
I think it would help to change the collision type to touch instead of slide, but I can't seem to figure it out in the bump documentation. Pardon the noobness! Does this make sense? Care to take a look? I've attached the code and it should work.
So I've been working on a game for a few weeks and and it has to have grown to the point where bump.lua might be the best collision manager for me. So lately I've been trying to update the code to make use of bump.
I've stripped down my code to help with testing/integrating this, so hopefully it can make sense to you. Right now the player character - the placeholder Crusader sprite - can walk around and bump into rectangles. If you hit the 'spacebar' key, it should generate a homing sprite that I would like to have destroyed on impact with the player character. That is, destroy the projectile, not the player character.
I can destroy the sprite if my crusader walks into the projectile, but if he/she stands still, the two will just slide up to each other, and the projectile will not destroy itself.
I think it would help to change the collision type to touch instead of slide, but I can't seem to figure it out in the bump documentation. Pardon the noobness! Does this make sense? Care to take a look? I've attached the code and it should work.