OK, I have another question and I'm going to post it here instead of making a new thread.
Now I have a level like this:
+----------------+
|.........._..........|
|.........| |.........|
|-------| |-------| the periods represent nothing, air if you will.
|......................| the --- and | represent walls
+----------------+
And I need the player to stop when he hits the wall. My code looks like this:
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
While ImagesCollide(Player1Anim, Player1\x, Player1\y, 0, WhatLevel, GraphicsWidth()/2, GraphicsHeight()/2, 0)
Player1\y = Player1\y - 1
Wend
endif
endif
But if I do this and the player collides with that wall, he will just "jump" to the top of the wall because of my While loop, any help please?
Now I have a level like this:
+----------------+
|.........._..........|
|.........| |.........|
|-------| |-------| the periods represent nothing, air if you will.
|......................| the --- and | represent walls
+----------------+
And I need the player to stop when he hits the wall. My code looks like this:
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
While ImagesCollide(Player1Anim, Player1\x, Player1\y, 0, WhatLevel, GraphicsWidth()/2, GraphicsHeight()/2, 0)
Player1\y = Player1\y - 1
Wend
endif
endif
But if I do this and the player collides with that wall, he will just "jump" to the top of the wall because of my While loop, any help please?