First of all I'm trying to add types like this:
Player1\y = Player1\y + Player1\Gravity
But it doesnt seem to register the "Player1\Gravity" part but if I replace it with a number it works fine.
And my type player is defined like this:
Type player ; main player
Field Frame
Field Status = 0 Field x, y
Field TempX, TempY
Field Health, Lives, Score, Gold
Field DropFlag = 0
Field Gravity = 1
End Type
Last, is there a better way to add gravity to my player other than this?
Player1\y = Player1\y + Player1\Gravity
If ImagesCollide(Player1Anim, Player1\x, Player1\y, 0, WhatLevel, GraphicsWidth()/2, GraphicsHeight()/2, 0)
Player1\y = Player1\y - 1
EndIf
Player1\y = Player1\y + Player1\Gravity
But it doesnt seem to register the "Player1\Gravity" part but if I replace it with a number it works fine.
And my type player is defined like this:
Type player ; main player
Field Frame
Field Status = 0 Field x, y
Field TempX, TempY
Field Health, Lives, Score, Gold
Field DropFlag = 0
Field Gravity = 1
End Type
Last, is there a better way to add gravity to my player other than this?
Player1\y = Player1\y + Player1\Gravity
If ImagesCollide(Player1Anim, Player1\x, Player1\y, 0, WhatLevel, GraphicsWidth()/2, GraphicsHeight()/2, 0)
Player1\y = Player1\y - 1
EndIf