local p1 = false;
local p2 = false;
local double = false;
local alone = false;


if GAMESTATE:IsHumanPlayer(PLAYER_1) and not GAMESTATE:IsHumanPlayer(PLAYER_2) then
	alone = true;
end;

if GAMESTATE:IsHumanPlayer(PLAYER_2) and not GAMESTATE:IsHumanPlayer(PLAYER_1) then
	alone = true;
end;

if GAMESTATE:IsHumanPlayer(PLAYER_1) then
	if GAMESTATE:GetCurrentSteps(PLAYER_1):GetDifficulty() == "Difficulty_Challenge" then
		p1 = true;
	end
end

if GAMESTATE:IsHumanPlayer(PLAYER_2) then
	if GAMESTATE:GetCurrentSteps(PLAYER_2):GetDifficulty() == "Difficulty_Challenge" then
		p2 = true;
	end
end

if GAMESTATE:IsSideJoined(PLAYER_1) then
	local steps = GAMESTATE:GetCurrentSteps(PLAYER_1);
	if steps:GetStepsType() == 'StepsType_Pump_Double' then
		double = true;
	end;
end;

if GAMESTATE:IsSideJoined(PLAYER_2) then
	local steps = GAMESTATE:GetCurrentSteps(PLAYER_2);
	if steps:GetStepsType() == 'StepsType_Pump_Double' then
		double = true;
	end;
end;


if double == false then
if alone == true then
if p2 == true or p1 == true then
	
	return Def.Quad {    
    InitCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y;scaletoclipped,SCREEN_WIDTH*2,SCREEN_HEIGHT*2;);
    OnCommand=cmd(finishtweening;diffusealpha,1;accelerate,0.25;diffusealpha,0);
};
end;
end;

if alone == false then
if p1 == true and p2 == false then
	
	return Def.Quad {    
    InitCommand=cmd(x,SCREEN_WIDTH/4;y,SCREEN_CENTER_Y;scaletoclipped,SCREEN_WIDTH/2,SCREEN_HEIGHT;);
    OnCommand=cmd(finishtweening;diffusealpha,1;accelerate,0.25;diffusealpha,0);
};
end;


if p2 == true and p1 == false then
	
	return Def.Quad {    
    InitCommand=cmd(x,SCREEN_WIDTH*(3/4);y,SCREEN_CENTER_Y;scaletoclipped,SCREEN_WIDTH/2,SCREEN_HEIGHT;);
    OnCommand=cmd(finishtweening;diffusealpha,1;accelerate,0.25;diffusealpha,0);
};
end;

if p2 == true and p1 == true then
	
	return Def.Quad {    
    InitCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y;scaletoclipped,SCREEN_WIDTH*2,SCREEN_HEIGHT*2;);
    OnCommand=cmd(finishtweening;diffusealpha,1;accelerate,0.25;diffusealpha,0);
};
end;
end;
end;

if double == true then
if p1 == true or p2 == true then
	
	return Def.Quad {    
    InitCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y;scaletoclipped,SCREEN_WIDTH*2,SCREEN_HEIGHT*2;);
    OnCommand=cmd(finishtweening;diffusealpha,1;accelerate,0.25;diffusealpha,0);
};

end;
end;