Andy Gilbert Posted November 30, 2009 Share Posted November 30, 2009 Ok.. Al im trying to do is in the lua editor outside of the editor, load a scene and place a model inside it? The code.. RegisterAbstractPath("") --Set graphics mode if Graphics(1024,768)==0 then Notify("Failed to set graphics mode.",1) return end world=CreateWorld() if world==nil then Notify("Failed to initialize engine.",1) return end gbuffer=CreateBuffer(GraphicsWidth(),GraphicsHeight(),1+2+4+8) scene=LoadScene("abstract::scene.sbx") model1=LoadMesh("abstract::simple_1.gmf") PositionEntity(model1,Vec3(-1,2,0)) camera=CreateCamera() camera:SetPosition(Vec3(0,20,0)) camera:Turnf(0.0,42,0.0) Collisions(1,1,1) while AppTerminate()==0 do UpdateAppTime() world:Update(AppSpeed()) SetBuffer(gbuffer) world:Render() SetBuffer(BackBuffer()) world:RenderLights(gbuffer) DrawText(UPS(),0,0) Flip(0) end Ok the above just crashes when you try to run it, remove the line PositionEntity(model1,Vec3(-1,2,0)) and it loads, but cannot see the model? am i doing it wrong? Andy Quote The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do. Leadwerks Game-Ready 3D Models:https://sellfy.com/gib3d Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.