If Player1\Gravity = 1 Then Player1\y = Player1\y + 5 ; initial gravity If ImagesCollide(Player1Anim, Player1\x, Player1\y, 0, WhatLevel, GraphicsWidth()/2, GraphicsHeight()/2, 0) Then If ImagesCollide(Player1Anim, Player1\x, Player1\y, 0, WhatLevel, GraphicsWidth()/2, GraphicsHeight()/2, 0) Player1\y = Player1\y - 1 Wend endif endif
You shouldnt use this:
While ImagesCollide(Player1Anim, Player1\x, Player1\y, 0, WhatLevel, GraphicsWidth()/2, GraphicsHeight()/2, 0)
cause it will freeze
Use "If" It will update every frame so dont use while
It usually is 30 or more fps, so updating shold be no problem.
*DEPENDING ON THE GRAPHICS CARD*