task renderGrannyGoreF(obj,type){

	let wi = 96;
	let he = 64;
	
	let dir;
	let speed;
	let whichway = 0;
	let frame = 0;
	let idleframe = 0;
	let turnframe = 0;
	let ph = 0;
	if(type == 1){ph=0;}
	if(type == 2){ph=he*3;}

	ObjPrim_SetTexture(obj,GetCurrentScriptDirectory ~ "./spriteimg/gorefairysprite.jpg");
	ObjSprite2D_SetSourceRect(obj,0,0,wi,he);
	ObjSprite2D_SetDestCenter(obj);
	ObjRender_SetScaleXYZ(obj,0.5,0.5,0);
	ObjRender_SetAngleXYZ(obj,0,180,0);
	
	while(!Obj_IsDeleted(obj)){
		
		dir = ObjMove_GetAngle(obj);
		speed = ObjMove_GetSpeed(obj);

		if(speed == 0 && frame > 0){whichway = -1;}
		else if(speed == 0 && frame < 0){whichway = 1;}
		else if(speed == 0 && frame == 0){whichway = 0;}

		else if(cos(dir) < 0){whichway=-1;}
		else if(cos(dir) > 0){whichway=1;}
		
		if(speed == 0 && frame == 0){

			turnframe = 0;
			if(idleframe >= 0 && idleframe < 10){ObjSprite2D_SetSourceRect(obj,0,ph,wi,he+ph);}
			else if(idleframe >= 10 && idleframe < 20){ObjSprite2D_SetSourceRect(obj,wi,ph,wi*2,he+ph);}
			else if(idleframe >= 20 && idleframe < 30){ObjSprite2D_SetSourceRect(obj,wi*2,ph,wi*3,he+ph);}
			else if(idleframe >= 30 && idleframe < 40){ObjSprite2D_SetSourceRect(obj,wi*3,ph,wi*4,he+ph);}
			
			if(idleframe < 40){idleframe++;}
			else if(idleframe == 40){idleframe=0;}
			
		}

		if(speed != 0 || frame != 0){
		
			if(frame < 0 && frame >= -10){ObjSprite2D_SetSourceRect(obj,0,he+ph,wi,he*2+ph); ObjRender_SetAngleXYZ(obj,0,180,0);}
			if(frame < -10 && frame >= -20){ObjSprite2D_SetSourceRect(obj,wi,he+ph,wi*2,he*2+ph); ObjRender_SetAngleXYZ(obj,0,180,0);}
			if(frame < -20 && frame >= -30){ObjSprite2D_SetSourceRect(obj,wi*2,he+ph,wi*3,he*2+ph); ObjRender_SetAngleXYZ(obj,0,180,0);}
			if(frame == -30){ObjSprite2D_SetSourceRect(obj,wi*3,he+ph,wi*4,he*2+ph); ObjRender_SetAngleXYZ(obj,0,180,0);}
			if(frame > 0 && frame <= 10){ObjSprite2D_SetSourceRect(obj,0,he+ph,wi,he*2+ph); ObjRender_SetAngleXYZ(obj,0,0,0);}
			if(frame > 10 && frame <= 20){ObjSprite2D_SetSourceRect(obj,wi,he+ph,wi*2,he*2+ph); ObjRender_SetAngleXYZ(obj,0,0,0);}
			if(frame > 20 && frame <= 30){ObjSprite2D_SetSourceRect(obj,wi*2,he+ph,wi*3,he*2+ph); ObjRender_SetAngleXYZ(obj,0,0,0);}
			if(frame == 30){ObjSprite2D_SetSourceRect(obj,wi*3,he+ph,wi*4,he*2+ph); ObjRender_SetAngleXYZ(obj,0,0,0);}
			idleframe=0;
			
		}
		
		if(frame == 35 || frame == -35){
			
			if(turnframe > 0 && turnframe <= 10){ObjSprite2D_SetSourceRect(obj,0,he*2+ph,wi,he*3+ph);}
			if(turnframe > 10 && turnframe <= 20){ObjSprite2D_SetSourceRect(obj,wi,he*2+ph,wi*2,he*3+ph);}
			if(turnframe > 20 && turnframe <= 30){ObjSprite2D_SetSourceRect(obj,wi*2,he*2+ph,wi*3,he*3+ph);}
			if(turnframe > 30 && turnframe <= 40){ObjSprite2D_SetSourceRect(obj,wi*3,he*2+ph,wi*4,he*3+ph);}
			if(turnframe < 40){turnframe++;}
			else if(turnframe == 40){turnframe=0;}
			
		}
		
		frame=frame+whichway;
		if(frame > 35){frame=35;}
		if(frame < -35){frame=-35;}
		yield;
		
	}
	
}

task renderRedheadGoreF(obj,type){

	let wi = 96;
	let he = 96;
	
	let dir;
	let speed;
	let whichway = 0;
	let frame = 0;
	let idleframe = 0;
	let turnframe = 0;
	let back = 1024-(wi*4);
	let ph = 0;
	if(type == 1){ph=0;}
	if(type == 2){ph=he*3;}

	ObjPrim_SetTexture(obj,GetCurrentScriptDirectory ~ "./spriteimg/gorefairysprite.jpg");
	ObjSprite2D_SetSourceRect(obj,0,0,wi,he);
	ObjSprite2D_SetDestCenter(obj);
	ObjRender_SetScaleXYZ(obj,0.5,0.5,0);
	ObjRender_SetAngleXYZ(obj,0,180,0);
	
	while(!Obj_IsDeleted(obj)){
		
		dir = ObjMove_GetAngle(obj);
		speed = ObjMove_GetSpeed(obj);

		if(speed == 0 && frame > 0){whichway = -1;}
		else if(speed == 0 && frame < 0){whichway = 1;}
		else if(speed == 0 && frame == 0){whichway = 0;}

		else if(cos(dir) < 0){whichway=-1;}
		else if(cos(dir) > 0){whichway=1;}
		
		if(speed == 0 && frame == 0){

			turnframe = 0;
			if(idleframe >= 0 && idleframe < 10){ObjSprite2D_SetSourceRect(obj,back,ph,back+wi,he+ph);}
			else if(idleframe >= 10 && idleframe < 20){ObjSprite2D_SetSourceRect(obj,back+wi,ph,back+wi*2,he+ph);}
			else if(idleframe >= 20 && idleframe < 30){ObjSprite2D_SetSourceRect(obj,back+wi*2,ph,back+wi*3,he+ph);}
			else if(idleframe >= 30 && idleframe < 40){ObjSprite2D_SetSourceRect(obj,back+wi*3,ph,back+wi*4,he+ph);}
			
			if(idleframe < 40){idleframe++;}
			else if(idleframe == 40){idleframe=0;}
			
		}

		if(speed != 0 || frame != 0){
		
			if(frame < 0 && frame >= -10){ObjSprite2D_SetSourceRect(obj,back,he+ph,back+wi,he*2+ph); ObjRender_SetAngleXYZ(obj,0,180,0);}
			if(frame < -10 && frame >= -20){ObjSprite2D_SetSourceRect(obj,back+wi,he+ph,back+wi*2,he*2+ph); ObjRender_SetAngleXYZ(obj,0,180,0);}
			if(frame < -20 && frame >= -30){ObjSprite2D_SetSourceRect(obj,back+wi*2,he+ph,back+wi*3,he*2+ph); ObjRender_SetAngleXYZ(obj,0,180,0);}
			if(frame == -30){ObjSprite2D_SetSourceRect(obj,back+wi*3,he+ph,back+wi*4,he*2+ph); ObjRender_SetAngleXYZ(obj,0,180,0);}
			if(frame > 0 && frame <= 10){ObjSprite2D_SetSourceRect(obj,back,he+ph,back+wi,he*2+ph); ObjRender_SetAngleXYZ(obj,0,0,0);}
			if(frame > 10 && frame <= 20){ObjSprite2D_SetSourceRect(obj,back+wi,he+ph,back+wi*2,he*2+ph); ObjRender_SetAngleXYZ(obj,0,0,0);}
			if(frame > 20 && frame <= 30){ObjSprite2D_SetSourceRect(obj,back+wi*2,he+ph,back+wi*3,he*2+ph); ObjRender_SetAngleXYZ(obj,0,0,0);}
			if(frame == 30){ObjSprite2D_SetSourceRect(obj,back+wi*3,he+ph,back+wi*4,he*2+ph); ObjRender_SetAngleXYZ(obj,0,0,0);}
			idleframe=0;
			
		}
		
		if(frame == 35 || frame == -35){
			
			if(turnframe > 0 && turnframe <= 10){ObjSprite2D_SetSourceRect(obj,back,he*2+ph,back+wi,he*3+ph);}
			if(turnframe > 10 && turnframe <= 20){ObjSprite2D_SetSourceRect(obj,back+wi,he*2+ph,back+wi*2,he*3+ph);}
			if(turnframe > 20 && turnframe <= 30){ObjSprite2D_SetSourceRect(obj,back+wi*2,he*2+ph,back+wi*3,he*3+ph);}
			if(turnframe > 30 && turnframe <= 40){ObjSprite2D_SetSourceRect(obj,back+wi*3,he*2+ph,back+wi*4,he*3+ph);}
			if(turnframe < 40){turnframe++;}
			else if(turnframe == 40){turnframe=0;}
			
		}
		
		frame=frame+whichway;
		if(frame > 35){frame=35;}
		if(frame < -35){frame=-35;}
		yield;
		
	}
	
}

task renderSunflowerGoreF(obj){

	let wi = 128;
	let he = 128;
	
	let dir;
	let speed;
	let whichway = 0;
	let frame = 0;
	let idleframe = 0;
	let turnframe = 0;
	let bm = 1024-he;

	ObjPrim_SetTexture(obj,GetCurrentScriptDirectory ~ "./spriteimg/gorefairysprite.jpg");
	ObjSprite2D_SetSourceRect(obj,0,0,wi,he);
	ObjSprite2D_SetDestCenter(obj);
	ObjRender_SetScaleXYZ(obj,0.5,0.5,0);
	ObjRender_SetAngleXYZ(obj,0,180,0);
	
	while(!Obj_IsDeleted(obj)){
		
		dir = ObjMove_GetAngle(obj);
		speed = ObjMove_GetSpeed(obj);

		if(speed == 0 && frame > 0){whichway = -1;}
		else if(speed == 0 && frame < 0){whichway = 1;}
		else if(speed == 0 && frame == 0){whichway = 0;}

		else if(cos(dir) < 0){whichway=-1;}
		else if(cos(dir) > 0){whichway=1;}
		
		if(speed == 0 && frame == 0){

			turnframe = 0;
			if(idleframe >= 0 && idleframe < 10){ObjSprite2D_SetSourceRect(obj,0,bm,wi,he+bm);}
			else if(idleframe >= 10 && idleframe < 20){ObjSprite2D_SetSourceRect(obj,wi,bm,wi*2,he+bm);}
			else if(idleframe >= 20 && idleframe < 30){ObjSprite2D_SetSourceRect(obj,wi*2,bm,wi*3,he+bm);}
			else if(idleframe >= 30 && idleframe < 40){ObjSprite2D_SetSourceRect(obj,wi*3,bm,wi*4,he+bm);}
			
			if(idleframe < 40){idleframe++;}
			else if(idleframe == 40){idleframe=0;}
			
		}

		if(speed != 0 || frame != 0){
		
			if(frame < 0 && frame >= -10){ObjSprite2D_SetSourceRect(obj,wi*4,bm,wi*5,he+bm); ObjRender_SetAngleXYZ(obj,0,180,0);}
			if(frame < -10 && frame >= -20){ObjSprite2D_SetSourceRect(obj,wi*5,bm,wi*6,he+bm); ObjRender_SetAngleXYZ(obj,0,180,0);}
			if(frame < -20 && frame >= -30){ObjSprite2D_SetSourceRect(obj,wi*6,bm,wi*7,he+bm); ObjRender_SetAngleXYZ(obj,0,180,0);}
			if(frame == -30){ObjSprite2D_SetSourceRect(obj,wi*7,bm,wi*8,he+bm); ObjRender_SetAngleXYZ(obj,0,180,0);}
			if(frame > 0 && frame <= 10){ObjSprite2D_SetSourceRect(obj,wi*4,bm,wi*5,he+bm); ObjRender_SetAngleXYZ(obj,0,0,0);}
			if(frame > 10 && frame <= 20){ObjSprite2D_SetSourceRect(obj,wi*5,bm,wi*6,he+bm); ObjRender_SetAngleXYZ(obj,0,0,0);}
			if(frame > 20 && frame <= 30){ObjSprite2D_SetSourceRect(obj,wi*6,bm,wi*7,he+bm); ObjRender_SetAngleXYZ(obj,0,0,0);}
			if(frame == 30){ObjSprite2D_SetSourceRect(obj,wi*7,bm,wi*8,he+bm); ObjRender_SetAngleXYZ(obj,0,0,0);}
			idleframe=0;
			
		}
		
		if(frame == 35 || frame == -35){
			
			if(turnframe > 0 && turnframe <= 10){ObjSprite2D_SetSourceRect(obj,wi*6,bm-he*2,wi*7,bm-he);}
			if(turnframe > 10 && turnframe <= 20){ObjSprite2D_SetSourceRect(obj,wi*7,bm-he*2,wi*8,bm-he);}
			if(turnframe > 20 && turnframe <= 30){ObjSprite2D_SetSourceRect(obj,wi*6,bm-he,wi*7,bm);}
			if(turnframe > 30 && turnframe <= 40){ObjSprite2D_SetSourceRect(obj,wi*7,bm-he,wi*8,bm);}
			if(turnframe < 40){turnframe++;}
			else if(turnframe == 40){turnframe=0;}
			
		}
		
		frame=frame+whichway;
		if(frame > 35){frame=35;}
		if(frame < -35){frame=-35;}
		yield;
		
	}
	
}
task renderTinyGoreF(obj,type){

	let wi = 64;
	let he = 64;
	
	let dir;
	let speed;
	let whichway = 0;
	let frame = 0;
	let idleframe = 0;
	let turnframe = 0;
	let bm = 1024-128-(he*5);
	let ph = 0;
	if(type == 1){ph=0;}
	if(type == 2){ph=he;}
	if(type == 3){ph=he*2;}
	if(type == 4){ph=he*3;}
	if(type == 5){ph=he*4;}

	ObjPrim_SetTexture(obj,GetCurrentScriptDirectory ~ "./spriteimg/gorefairysprite.jpg");
	ObjSprite2D_SetSourceRect(obj,0,0,wi,he);
	ObjSprite2D_SetDestCenter(obj);
	ObjRender_SetScaleXYZ(obj,0.5,0.5,0);
	ObjRender_SetAngleXYZ(obj,0,180,0);
	
	while(!Obj_IsDeleted(obj)){
		
		dir = ObjMove_GetAngle(obj);
		speed = ObjMove_GetSpeed(obj);

		if(speed == 0 && frame > 0){whichway = -1;}
		else if(speed == 0 && frame < 0){whichway = 1;}
		else if(speed == 0 && frame == 0){whichway = 0;}

		else if(cos(dir) < 0){whichway=-1;}
		else if(cos(dir) > 0){whichway=1;}
		
		if(speed == 0 && frame == 0){

			turnframe = 0;
			if(idleframe >= 0 && idleframe < 10){ObjSprite2D_SetSourceRect(obj,0,bm+ph,wi,he+ph+bm);}
			else if(idleframe >= 10 && idleframe < 20){ObjSprite2D_SetSourceRect(obj,wi,bm+ph,wi*2,he+ph+bm);}
			else if(idleframe >= 20 && idleframe < 30){ObjSprite2D_SetSourceRect(obj,wi*2,bm+ph,wi*3,he+ph+bm);}
			else if(idleframe >= 30 && idleframe < 40){ObjSprite2D_SetSourceRect(obj,wi*3,bm+ph,wi*4,he+ph+bm);}
			
			if(idleframe < 40){idleframe++;}
			else if(idleframe == 40){idleframe=0;}
			
		}

		if(speed != 0 || frame != 0){
		
			if(frame < 0 && frame >= -10){ObjSprite2D_SetSourceRect(obj,wi*4,bm+ph,wi*5,he+ph+bm); ObjRender_SetAngleXYZ(obj,0,180,0);}
			if(frame < -10 && frame >= -20){ObjSprite2D_SetSourceRect(obj,wi*5,bm+ph,wi*6,he+ph+bm); ObjRender_SetAngleXYZ(obj,0,180,0);}
			if(frame < -20 && frame >= -30){ObjSprite2D_SetSourceRect(obj,wi*6,bm+ph,wi*7,he+ph+bm); ObjRender_SetAngleXYZ(obj,0,180,0);}
			if(frame == -30){ObjSprite2D_SetSourceRect(obj,wi*7,bm+ph,wi*8,he+ph+bm); ObjRender_SetAngleXYZ(obj,0,180,0);}
			if(frame > 0 && frame <= 10){ObjSprite2D_SetSourceRect(obj,wi*4,bm+ph,wi*5,he+ph+bm); ObjRender_SetAngleXYZ(obj,0,0,0);}
			if(frame > 10 && frame <= 20){ObjSprite2D_SetSourceRect(obj,wi*5,bm+ph,wi*6,he+ph+bm); ObjRender_SetAngleXYZ(obj,0,0,0);}
			if(frame > 20 && frame <= 30){ObjSprite2D_SetSourceRect(obj,wi*6,bm+ph,wi*7,he+ph+bm); ObjRender_SetAngleXYZ(obj,0,0,0);}
			if(frame == 30){ObjSprite2D_SetSourceRect(obj,wi*7,bm+ph,wi*8,he+ph+bm); ObjRender_SetAngleXYZ(obj,0,0,0);}
			idleframe=0;
			
		}
		
		if(frame == 35 || frame == -35){
			
			if(turnframe > 0 && turnframe <= 10){ObjSprite2D_SetSourceRect(obj,wi*8,bm+ph,wi*9,he+ph+bm);}
			if(turnframe > 10 && turnframe <= 20){ObjSprite2D_SetSourceRect(obj,wi*9,bm+ph,wi*10,he+ph+bm);}
			if(turnframe > 20 && turnframe <= 30){ObjSprite2D_SetSourceRect(obj,wi*10,bm+ph,wi*11,he+ph+bm);}
			if(turnframe > 30 && turnframe <= 40){ObjSprite2D_SetSourceRect(obj,wi*11,bm+ph,wi*12,he+ph+bm);}
			if(turnframe < 40){turnframe++;}
			else if(turnframe == 40){turnframe=0;}
			
		}
		
		frame=frame+whichway;
		if(frame > 35){frame=35;}
		if(frame < -35){frame=-35;}
		yield;
		
	}
	
}