CountDownM
Member
the character is not spawning at the location i set and the camera is scrolling in a weird way
spawn Empty
@script
void main()
{
void P1 = getplayerproperty(0, "entity");
if(P1){
changeentityproperty(P1,"position", 500, 200);
}
}
@end_script
coords 320 460
at 0
spawn Empty
@script
void main()
{
void P1 = getplayerproperty(0, "entity");
int Width = openborvariant("levelwidth");
int Screen = openborvariant("hResolution"); // Get screen width
int x = 600; // player 1's starting x coord
int Cam;
if(x > Width){
x = Width;
Cam = Width - Screen;
} else if(x > Width - Screen){
Cam = Width - Screen;
} else if(x < 0){
x = 0;
Cam = 0;
} else {
Cam = x - Screen/2;
}
if(P1){
changeentityproperty(P1, "position", x, 200);
changeopenborvariant("xpos", Cam);
}
}
@end_script
coords 320 460
at 0