Cannot get lua to work
Posted: Sat Dec 30, 2017 9:59 pm
I got t his codes from youtube and try to apply. However it's not working. I tried other codes as well and nothing happens when I test the game. I'm using notepad++.
Code: Select all
local playerDirection = 0;
function onloop()
playerDirection = player:mem(0x106, FIELD_WORD)
end
function onKeyDown(keycode)
if keycode == KEY_JUMP then
a = NPC.spawn(1, player.x, player.y - 128,player.section)
a.speedY = -2;
a.speedX = 5 * playerDirection;
end
end