if(hit == 0)
{
hit = 1;
do_damage calculation;
}
wait = 30;
//or whatever you want it to be,
//if you're game runs at 30 fps set wait to the fps rate(30) for a 1
//1 second wait time
if(hit == 1)transp = .5;
if(hit == 0)transp = 0;
wait -= 1;
if(wait <= 0)hit = 0;
Users browsing this forum: No registered users and 1 guest