Trouble with adding field types and Gravity

Blitz3D Forums/Blitz3D Beginners Area/Trouble with adding field types and Gravity

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

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*