Also, I'm trying to apply this to a cube, I see no errors to pop up from anywhere but nothing happens when I run the game.
--get stuff
Cube = getObject("Entity0")
function onSceneUpdate()
if isKeyPressed("W") then
addCentralForce(Player, {8, 0, 0}, "local")
end
end
My first shot at Lua ...lol
Also when I exit maratis and I try to open a project and then load a level a first it seems all right but when I try to publish it (File->Publish Project) it says that I need to open a project first, but I have.
(Nevermind, fixed the publish thingy, but still wondering about the script I guess im going to sleep on it.)
Solved the code (feel so dumb) I left typed Player instead of Entity in addCentralForce oh wells.
It would have been nice to see a message when you try to access something that isn't on your scene.