Hi, I am using A8 Pro 8.47. I have a youtube video on the bottom as well.

I am placing a blood TGA file onto an animated model entity using the ent_decal code from the manual, but I am running into a glitch. Once in a while, part of the decal will not update, which makes decal polygons float in the air, while the model is animated.

here is the ent_decal code:
Code:
particle_mode = 4;

...

result=c_trace(camera.x,cam_mouse_screen.x,IGNORE_ME|IGNORE_PASSABLE|ACTIVATE_SHOOT|IGNORE_CONTENT|SCAN_TEXTURE|USE_POLYGON); 	
	

 if (HIT_TARGET) // target hit?
{
         	
if(you==NULL)
{

         	
PARTICLE* p = ent_decal(NULL,test_decal,217+random(3),random(360)); // place a random sized decal at the hit entity 
            p.lifespan = 160;   // remove decal after 100 seconds
            	
}


else

{
				 
PARTICLE* p = ent_decal(you,test_decal,217+random(3),random(360)); // place a random sized decal at the hit entity 
            p.lifespan = 160;   // remove decal after 100 seconds	
				}
 
            
             
         }




Here is the animated entity code:
Code:
action test_animate_simple()
 {
 	
 
 var animsa;
 	
 	while(1)
 	{
 		
 		
 	ent_animate(me,"run",animsa, ANM_CYCLE);
 		animsa+=5*time_step;
 		animsa%=100;
 		
 		
 		wait(1);
 	}
 	
 	
 	
 	
}



Video Example
[video:youtube]https://www.youtube.com/watch?v=0_kLlK1RXFo[/video]