hi, im creating a game throught C++ using the SDL thing (ive already got a little help off you before, thanks by the way) and i was wondering if i could create a kind of explosion lasting one second or so when a collision is detected in the place of where my bad guy is
i create the enemy using
and i was wondering if, when a collision is detected could a new picture be drawn (i.e. an explosion) and that picture to stay on screen for about a secondCode:evil[i] = new Sprite ("U:\\2E3\\hi\\hi\\wood.gif");
by the way, i use
to delete my guy off the screen, but that is called in the same place that i want to call explosions and when i create an explosion picture it just goes straight to alive = false before it even gets around to draw the picturesCode:evil[i]->alive = false;
so basically what i want is
thanks if you can helpCode:if (collision == true) { create a bad guy on screen for 1 second (or 16 frames because i think thats the speed it runs at) evil[i]->alive = false; // kill the guy after he has been up for a second }



LinkBack URL
About LinkBacks



.