Hello, I got a problem with deleting an animated explosion sprite. You see, when I launch my rocket or something and it does collision with the enemy I want that rocket and enemy would delete and in the spot where the collision happened to make an explosion. Everything is going okay, but the explosion just keeps looping. I want that after it it shown the explosion or 4 frames it would delete.
Here's the code.
dbPlaySprite(explosion,1,4,100);
if(dbSpriteCollision(bullet,enemy1)==1)
{
dbSprite(explosion,dbSpriteX(enemy1),dbSpriteY(enemy1),explosion);
dbDeleteSprite(bullet);
dbDeleteSprite(enemy1);
dbDeleteSprite(explosion);
}