
task TExplosionA(x, y, dAlpha, dScale)
{
	let path = GetCurrentScriptDirectory() ~ "img/Default_Effect.png";
	let obj = ObjPrim_Create(OBJ_SPRITE_2D);
	ObjPrim_SetTexture(obj, path);
	Obj_SetRenderPriority(obj, 0.65);
	ObjRender_SetBlendType(obj, BLEND_ADD_RGB);
	ObjSprite2D_SetSourceRect(obj, 1, 1, 63, 63);
	ObjSprite2D_SetDestCenter(obj);
	ObjRender_SetPosition(obj, x, y, 0);

	let scale = 0;
	let alpha = 255;
	while(alpha > 0)
	{
		ObjRender_SetColor(obj, alpha, alpha, alpha);
		ObjRender_SetScaleXYZ(obj, scale, scale, 1);

		scale += dScale;
		alpha -= dAlpha;
		yield;
	}
	Obj_Delete(obj);
}

	/*task death{
	SetCommonData("ForceLifebar",1);
	PlaySound("bossdeath",92,0);
	FakeEnd;
	wait( 100 );
	FakeEnd2;
	DelaySound;
	StartSlow( TARGET_ALL, 30 );
	wait( 90 );
	//ObjRender_SetAlpha( objBoss, 0 );
	ScreenShake( 30, 50 );
	StopSlow( TARGET_ALL );	
	wait( 160 );
	}*/




