C
cidyuki
Guest
I am a novice with GameMaker.
I search to coding a smooth moving of the camera, to represent the view of the player.
When the player press "up" the camera move to top until a limit.
When he release "up" the camera comeback to initial position.
On the code that I wrote the while condition crash the game.
On this code
And
Do my
I search to coding a smooth moving of the camera, to represent the view of the player.
When the player press "up" the camera move to top until a limit.
When he release "up" the camera comeback to initial position.
On the code that I wrote the while condition crash the game.
GML:
// look at the top
if (keyboard_check(vk_up))
{
while(oPlayerView.y < oPlayer.y + 200)
{
oPlayerView.y -= 2;
}
}
else
{
while(oPlayerView.y == oPlayer.y)
{
oPlayerView.y += 2 ;
}
}
oPlayerView
is the object link to my following object on the room's window.oPlayer
is the object for the player.And
200
is the limit.Do my
while
condition is right ?