Put this code on View -> Draw Actor -> Script Editor :
- Code: Select all
x=max(Player.x-width/2-2,min(x,Player.x-width/2+2));
y=max(Player.y-width/2-2,min(y,Player.y-width/2+2));
*Note: Change "Player" to your player's name.
x=max(Player.x-width/2-2,min(x,Player.x-width/2+2));
y=max(Player.y-width/2-2,min(y,Player.y-width/2+2));
sp1d3r wrote:is there any ways to keep the player always in the middle of the view no matter if u fall ,jump,jump down and across,jump up and across
sp1d3r wrote:i dont want it to be alway center on the y
if(player.x>x)
{
x+=5;
}
if(player.x<x)
{
x-=5;
}
if(player.y>y)
{
y-=5;
}
if(player.y<y)
{
y+=5;
}
savvy wrote:
- Code: Select all
if(player.x>x)
{
x+=5;
}
if(player.x<x)
{
x-=5;
}
if(player.y>y)
{
y-=5;
}
if(player.y<y)
{
y+=5;
}
Bee-Ant wrote:
- Code: Select all
x=max(Player.x-width/2-2,min(x,Player.x-width/2+2));
y=max(Player.y-width/2-2,min(y,Player.y-width/2+2));
Users browsing this forum: No registered users and 1 guest