GetScancode(1) should be written like this GetScancode()
you also need to turn off collision to move objects (and if you assign the script to the object there's no need for the object number, just use e)
also you will need a TransportToIfUsed(e) in there (with the name in the ifused property field) to actually move the player - i assume this is for moving the player?
LUA Script - precede every function and global member with lowercase name of script + '_main'
-- Default script - does nothing.
-- In this case Player = 1
function fly_init(e)
end
function fly_main(e)
CollisionOff(e)
TransportToIfUsed(e)
Prompt(GetScancode())
if GetScancode() == 24 then
-- Should make Player go Up by pressing 'O'.
MoveUp(e,1000)
end
if GetScancode() == 38 then
-- Should make Player go Down by pressing 'L'.
MoveUp(e,-1000)
end
--WHY DOES THIS NOT WORK?
end
life\'s one big game
windows vista ultimate
i5 @3.3ghz, 4gb ram, AMD R9 200 series , directx 11