let CSD = GetCurrentScriptDirectory; 
let ice1 = CSD ~ "system\effect1.png";

LoadGraphic(ice1);
task effect(x,y,scale){
	let obj = Obj_Create(OBJ_EFFECT);
	let counter = 0;
	ObjEffect_SetRenderState(obj,ADD);
	ObjEffect_SetTexture(obj,ice1);

	Obj_SetPosition(obj,x,y);
	ObjEffect_SetScale(obj,scale,scale);
	ObjEffect_SetLayer(obj,0.01);

	ObjEffect_SetPrimitiveType(obj,PRIMITIVE_TRIANGLESTRIP);
	ObjEffect_CreateVertex(obj,4);

	ObjEffect_SetVertexXY(obj,0,-26,-33);
	ObjEffect_SetVertexXY(obj,1,26,-33);
	ObjEffect_SetVertexXY(obj,2,-26,33);
	ObjEffect_SetVertexXY(obj,3,26,33);


	ObjEffect_SetVertexUV(obj,0,0,0);
	ObjEffect_SetVertexUV(obj,1,52,0);
	ObjEffect_SetVertexUV(obj,2,0,67);
	ObjEffect_SetVertexUV(obj,3,52,67);
	
	while(!Obj_BeDeleted(obj)){
	if(counter==600){Obj_Delete(obj);}
	Obj_SetPosition(obj,x,y+counter);
		ObjEffect_SetAngle(obj,0,0,counter/1.5);
		counter++;
		yield;
		}
	}