shiftybill
January 2nd, 2006, 09:35
heya all i decided to make a simple megaman game in LUA
im having trouble displaying some of the pictures heres some of my code
function input()
pad = Controls.read()
if pad:left() or pad:right() == true then
move = true
else
move = false
end
if move == true then
if pad:left() then
stance = mmrunleft
lastdir = left
end
if pad:right() then
stance = mmrunright
lastdir = right
end
end
if move == false then
if lastdir == left then
stance = mmstandleft
end
if lastdir == right then
stance = mmstandright
end
end
end
while true do
input()
screen:blit(playerx, playery, stance[picnumber], true)
end
when i let go of either the left or right button it always displays the standing right pictures, I dont know how to fix this plese help me!
im having trouble displaying some of the pictures heres some of my code
function input()
pad = Controls.read()
if pad:left() or pad:right() == true then
move = true
else
move = false
end
if move == true then
if pad:left() then
stance = mmrunleft
lastdir = left
end
if pad:right() then
stance = mmrunright
lastdir = right
end
end
if move == false then
if lastdir == left then
stance = mmstandleft
end
if lastdir == right then
stance = mmstandright
end
end
end
while true do
input()
screen:blit(playerx, playery, stance[picnumber], true)
end
when i let go of either the left or right button it always displays the standing right pictures, I dont know how to fix this plese help me!