• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Legacy GM Camera Wont Shake

L

LanderMiskolczi

Guest
For some reason my camera wont shake, when I press H the screen should shake, but instead it stays still like normal. Here is the step event
Code:
/// Follow the player
if (instance_exists(oPlayer))
{
    var xTo = (oPlayer.x - x) / 25;
    var yTo = ((oPlayer.y - 16) - y) / 25;
}

x += xTo;
y += yTo;

view_xview[0] = -(view_wview[0] / 2) + x;
view_yview[0] = -(view_hview[0] / 2) + y;

view_xview[0] += random_range(-shakeVal, shakeVal);
view_yview[0] += random_range(-shakeVal, shakeVal);
shakeVal *= .9;
The camera is created in an object but I've to put it in manually but that didn't fix it.
 
Top