In each of the elseif btn(...) blocks you're modifying the X value.
example :
elseif btn(3) then if(solid_tile(player.x,player.y+8+1) == false) then player.x += 1 else player.y += 0.2 end player.y += player.speed movey() player.flipv = false end |
To be honest, I don't understand this. Why are you adding 1 to player.x? Shouldn't it look more like this?
elseif btn(3) then if(solid_tile(player.x,player.y+8+1) == false) then player.y += player.speed end movey() player.flipv = false end |
That worked beautifully! Thank you. I am brand new to the world of coding, so I've just been Frankensteining a bunch of code. :-P
[Please log in to post a comment]