Here's a simple way to do it:
Code: Select all
player.xVel = player.xVel * (1 - math.min(player.friction*dt, 1))
Code: Select all
player.xVel = player.xVel * (1 - math.min(player.friction*dt, 1))
Code: Select all
function foo()
return 1, 2, 3
end
two = {foo()}[2]
Code: Select all
function map.setLvl(n)
if n == 0 then
map.load0()
elseif n == 1 then
map.load1()
elseif n == 2 then
map.load2()
elseif n == 3 then
map.load3()
end
end
Code: Select all
function map.setLvl(n)
map.load[n]()
end
Oh my god! I didnt even know this game existed! This is awesome! Thanks for your help anyway, I still can do something stupid like that play call in update, so it definetly helps to have someone point that outzorg wrote:Neat gorilla.bas remake though.