Carve Posted August 12, 2010 Share Posted August 12, 2010 Excuse me if this is in the incorrect section.. I recently purchased LSDK (go Josh!), and I'm definitely in love with this system! I'm just curious as to how you get entitys from the Editor -> Compiled Product? For an example, I started a LEO (console) project, VS 2008, added LoadScene("abstract::scene.sbx"); Now the issue's are: my skybox material & things are loaded, and the 'waterplane' supplied with LSDK, but once compiled (even with no errors or anything in the console about missing mats, shaders, etc) nothing shows up, except my terrain and the materials for it.. Am I doing something wrong? Another question, how do I utilize LUA or XML inside of c\c++? Do I have to write parsers for each or whats the process involved there? Sorry if these questions are repeated often, I did a search and haven't found anything relevant to my needs, and the wiki seems a tad bit outdated? Thanks ! Quote Link to comment Share on other sites More sharing options...
Pixel Perfect Posted August 12, 2010 Share Posted August 12, 2010 I'd have a look at engine.log initially for any warning entries where the engine has not been able to load items for one reason or another. It might just be an abstract path issue. As I don't use LUA at all you might be better waiting for someone who's a bit more familiar with it replying but the LUA object scripting side should run transparently. So anything that works in the editor should be loaded and executed in the code. That's as far as the LUA implementation goes as far as I'm aware. It's not currently possible to expose and use your own functionality written in C/C++ to LUA or run LUA scripts independent of the current LUA framework without implementing that yourself. Quote Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++ Link to comment Share on other sites More sharing options...
AggrorJorn Posted August 12, 2010 Share Posted August 12, 2010 Do you have all the media that you use in your scene copied to your game project? Have you copied the scripts folder from ? Many lua class scripts like waterplane use the 'fw' for accessing the framework.adding this code to your project might help: TFramework framework=CreateFramework() unsigned char L=GetLuaState(); lua_pushobject(L,framework); lua_setglobal(L,"fw"); lua_pop(L,1); Quote Link to comment Share on other sites More sharing options...
Admin Posted August 12, 2010 Share Posted August 12, 2010 Another question, how do I utilize LUA or XML inside of c\c++? Do I have to write parsers for each or whats the process involved there? The GetLuaState functions returns the global Lua state, and you can use the Lua library from that point on. Quote Link to comment Share on other sites More sharing options...
Carve Posted August 12, 2010 Author Share Posted August 12, 2010 Do you have all the media that you use in your scene copied to your game project? Have you copied the scripts folder from ? Many lua class scripts like waterplane use the 'fw' for accessing the framework.adding this code to your project might help: TFramework framework=CreateFramework() unsigned char L=GetLuaState(); lua_pushobject(L,framework); lua_setglobal(L,"fw"); lua_pop(L,1); 1 - I have all media needed 2 - I copied the scripts folder from Scripts in Leadwerks SDK 3 - So I have to access the LUA Framework from C\C++ to be able to utilize for example a water plane? I might have asked too many questions at first, I'm basicly trying to utilize the 'waterplane' (lua) script that WORKS fine in Editor, but doesn't in the Game.exe? Quote Link to comment Share on other sites More sharing options...
Admin Posted August 12, 2010 Share Posted August 12, 2010 The code he posted creates a framework object and sets the Lua variable to that object. Do this first, then load your world, and all scripted objects should have access to the framework object, which is used for advanced rendering settings. Quote Link to comment Share on other sites More sharing options...
Carve Posted August 12, 2010 Author Share Posted August 12, 2010 The code he posted creates a framework object and sets the Lua variable to that object. Do this first, then load your world, and all scripted objects should have access to the framework object, which is used for advanced rendering settings. Awesome, thanks! Quote Link to comment Share on other sites More sharing options...
Carve Posted August 12, 2010 Author Share Posted August 12, 2010 Ok, I don't know what I'm doing wrong, but 90% of the things I set in the Scene in the Editor work. The only things I am having trouble showing are: SkyBox & Waterplane, I didn't really see any tutorial or guide showing how to utilize things such as waterplane (lua i believe) inside the actual program's code (C++), what am I missing? Edit: Resolved 99% of my issues, thanks, just took more trial and error then anything Quote Link to comment Share on other sites More sharing options...
Shard Posted August 22, 2010 Share Posted August 22, 2010 Ok, I don't know what I'm doing wrong, but 90% of the things I set in the Scene in the Editor work. The only things I am having trouble showing are: SkyBox & Waterplane, I didn't really see any tutorial or guide showing how to utilize things such as waterplane (lua i believe) inside the actual program's code (C++), what am I missing? Edit: Resolved 99% of my issues, thanks, just took more trial and error then anything Theres an entities folder in the models folder in the LSDK folder. Copy that to your project folder. Quote Programmer/Engineer/Student www.reikumar.com 2.6 GHz Intel Core Duo - nVidia GeForce 8600 GT - Windows 7 64-bit - 4 Gigs RAM C++ - Visual Studio Express - Dark GDK - Leadwerks SDK Link to comment Share on other sites More sharing options...
AggrorJorn Posted August 22, 2010 Share Posted August 22, 2010 Besides the water entity you also have to copy the water textures from the material folder. The skybox also needs to be copied from the materials folder. Quote 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.