G
Gluestick
Guest
I'm trying to make a non-linear game. One of the things I want to do is make it so a player can "enter" a both-direction level from multiple points (ex. the left side, right side, and points in between). So far I'm doing left and right by making two versions of the level, one for starting from each side. I'm having more difficulty starting a level in the middle of the level. I got the players appearing in the middle of the level like I want:
But problems arise when a player hits a button in the couple of seconds it takes the camera to pan from the left side of the level to the middle of it. The player just pops up at whatever point the camera is at.
Are there any script commands to just jump the camera to a particular point? If not, is there a way to lock player inputs for those couple of seconds?
Code:
spawn empty
@script
void main()
{
int P1 = getplayerproperty(0, "entity");
int P2 = getplayerproperty(1, "entity");
void self = getlocalvar("self"); //Get calling entity.
changeentityproperty(self, "position", 837, 177, 0);
if(P1){
changeentityproperty(P1, "position", 837, 177, 0);
changeentityproperty(P1, "direction", 0); //Face left
}
if(P2){
changeentityproperty(P2, "position", 837, 200, 0);
changeentityproperty(P2, "direction", 0); //Face left
}
}
@end_script
coords 430 200
at 0
But problems arise when a player hits a button in the couple of seconds it takes the camera to pan from the left side of the level to the middle of it. The player just pops up at whatever point the camera is at.
Are there any script commands to just jump the camera to a particular point? If not, is there a way to lock player inputs for those couple of seconds?