Makkeonmies
Member
So I've tried a couple different screen shake scripts and they work just fine in my game in single player - that is, when there's just one single view that follows the player, but if i try to modify it to fit the two-player mode, it just doesn't work. (that is, when there is two views following two different players) The shake effect always does some crazy tricks like throws the other player's view to god knows where or smth of the sort.
The code I'm currently using:
Create:
alarm[0] = 10;
Alarm 0:
view_xview[0] = 0;
view_yview[0] = 0;
instance_destroy();
Step:
view_xview[0] = random_range(-2,2);
view_yview[0] = random_range(-2,2);
So in two-player mode, I try to put both player's views there, as in:
Step:
view_xview[0] = random_range(-2,2);
view_yview[0] = random_range(-2,2);
view_xview[1] = random_range(-2,2);
view_yview[1] = random_range(-2,2);
Alarm 0:
view_xview[0] = 0;
view_yview[0] = 0;
view_xview[1] = 0;
view_yview[1] = 0;
instance_destroy();
But it goes into a mess. Other screen shake effect scripts have provided me a similar outcome if I've tried to modify it into following two views instead of one, it messes up the views completely in some way.
The views are always following the player objects in the rooms if that matters.
Any help?
thanks beforehand
The code I'm currently using:
Create:
alarm[0] = 10;
Alarm 0:
view_xview[0] = 0;
view_yview[0] = 0;
instance_destroy();
Step:
view_xview[0] = random_range(-2,2);
view_yview[0] = random_range(-2,2);
So in two-player mode, I try to put both player's views there, as in:
Step:
view_xview[0] = random_range(-2,2);
view_yview[0] = random_range(-2,2);
view_xview[1] = random_range(-2,2);
view_yview[1] = random_range(-2,2);
Alarm 0:
view_xview[0] = 0;
view_yview[0] = 0;
view_xview[1] = 0;
view_yview[1] = 0;
instance_destroy();
But it goes into a mess. Other screen shake effect scripts have provided me a similar outcome if I've tried to modify it into following two views instead of one, it messes up the views completely in some way.
The views are always following the player objects in the rooms if that matters.
Any help?
thanks beforehand