I wanted to display a muzzle flash, but now I am using it as a panel with a muzzle flash image.

But I want the muzzle flash to have a random PAN, and I can't find out how a panel can be rotated.
Do I have to make a entity from it?
Is it possible to generate a entity from within the script by showing if from a defined BMAP?

This is my script right now for the muzzle flash:

Code:
BMAP* bmap_muzzle = "muzzle.tga";
PANEL* pan_muzzle = {
	bmap = "bmap_muzzle";
}
function muzzle(){
	var tmpx = random(0.3)+0.5;
	pan_muzzle.scale_x = tmpx;
	pan_muzzle.scale_y = tmpx;
	pan_muzzle.pan = random(90)
	pan_muzzle.pos_x = (screen_size.x - bmap_width(pan_muzzle.bmap) * tmpx) / 2;
	pan_muzzle.pos_y = (screen_size.y - bmap_height(pan_muzzle.bmap) * tmpx) / 2;
	pan_muzzle.flags = VISIBLE | OVERLAY;
	wait(-0.05);
	pan_muzzle.flags = 0;
}



The best games are the games you create yourself.