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...
Marleys Ghost Posted November 30, 2009 Share Posted November 30, 2009 am i doing it wrong? Andy As far as I know lua does not use Josh's Abstract file system. So could be a path issue. Having said that, you are attempting to write a lua script in the lua editor? Quote AMD Bulldozer FX-4 Quad Core 4100 Black Edition 2 x 4GB DDR3 1333Mhz Memory Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5 Windows 7 Home 64 bit BlitzMax 1.50 • Lua 5.1 • MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro 3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET LE 2.5/3.4 • Skyline • UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0 Marleys Ghost's YouTube Channel • Marleys Ghost's Blog "I used to be alive like you .... then I took an arrow to the head" Link to comment Share on other sites More sharing options...
Josh Posted November 30, 2009 Share Posted November 30, 2009 The Lua command dofile() does not use the abstract system. LE commands work as they normally do. Please post a demo, otherwise we are just speculating. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Andy Gilbert Posted November 30, 2009 Author Share Posted November 30, 2009 It loads the scene fine?? and thats set using the abstract system? Just the model. And its crashing when the entityposition line is there, loads fine without it? 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...
Andy Gilbert Posted November 30, 2009 Author Share Posted November 30, 2009 well ill post a demo if you want but it can easily be replicated? the scene it nothing but a terrain and the model is a cube? But the loading of stuff doesnt seem a problem.. It just literally crashes when i try to use the commands PositionEntity and also ive noticed EntityType? 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...
Josh Posted November 30, 2009 Share Posted November 30, 2009 Without a demo, I can only guess what you might be doing. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Andy Gilbert Posted November 30, 2009 Author Share Posted November 30, 2009 Without a demo, I can only guess what you might be doing. Ok ,well ive now found out what the prob is (which i thought you might of picked up on) I was using the command PositionEntity where as in lua it seems its SetPosition? I was under the impression most commands where the same? is there not a compiled list of the lua commands for LE as it seems its just a guessing game? 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...
Josh Posted November 30, 2009 Share Posted November 30, 2009 The Lua commands match the BlitzMax methods, but you are right they are not completely documented yet. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Andy Gilbert Posted November 30, 2009 Author Share Posted November 30, 2009 Hmm, do you have a ETA (i know your busy) with a list of commands? and just so i know... are ALL LE commands avaialble via lua? Cheers 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...
Andy Gilbert Posted November 30, 2009 Author Share Posted November 30, 2009 They should all be. If you want to see exactly how they are exposed, see my thread in this forum talking about exposing Lua commands in BMX. Hmm not sure if i understand that, all i need know is commands, which im sure many others do to: for isntance like now, im trying to set the entity type in lua? I havnt got a clue what it is, ive tried the obvious: model1:EntityType(1) - nope model1:SetType(1) - nope model1:CollisionType(1) - nope I dare say you could tell me... but then ill only get to the next command i need and same prob. Also whilst your here... Ive noticed some commands arnt syntaxed? or color coded? For instance: model1=LoadMesh("abstract::simple.gmf") model1:SetPosition(Vec3(0,2,5)) model1:SetScale(Vec3(0.1,0.1,0.1)) model1body=CreateBodyBox(2,2,5) model1:SetParent(model1body) model1body:SetMass(1) SetScale , Setmass arnt yet they work fine. Thanks 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...
Josh Posted November 30, 2009 Share Posted November 30, 2009 entity:SetCollisionType(type,recursive=0) Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
ESP Posted December 1, 2009 Share Posted December 1, 2009 The language is case sensitive Keep trying till it goes blue Robin Quote Programmer , Intel Quad core, NVIDIA GeForce GT 220, Windows 7 Pro, Galaxy Tab 2 ( 7" and 10"), LE2,LE3,3DWS Link to comment Share on other sites More sharing options...
Marleys Ghost Posted December 1, 2009 Share Posted December 1, 2009 Keep trying till it goes blue But STOP if you turn blue Quote AMD Bulldozer FX-4 Quad Core 4100 Black Edition 2 x 4GB DDR3 1333Mhz Memory Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5 Windows 7 Home 64 bit BlitzMax 1.50 • Lua 5.1 • MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro 3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET LE 2.5/3.4 • Skyline • UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0 Marleys Ghost's YouTube Channel • Marleys Ghost's Blog "I used to be alive like you .... then I took an arrow to the head" Link to comment Share on other sites More sharing options...
Recommended Posts
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.