Dan Posted March 31, 2010 Share Posted March 31, 2010 I am trying to make a simple proof of concept and I want to be able to use my modified FPS and Vehicle LUA scripts within a C++ project. Has anyone done this yet and if so what is the call to the LUA script and where does it go? Quote Windows XP SP3 Intel Core2 Extreme 3GHz 2GB DDR2 RAM 2x NVIDIA GeForce GTX 280 in SLI Link to comment Share on other sites More sharing options...
AggrorJorn Posted April 1, 2010 Share Posted April 1, 2010 This comes from the PDF document "Getting started with Lua": The C++ programming language can interface seamlessly with Lua. Class scripts and startup scripts work with any program, including a C/C++ project. C/C++ can also use the Lua command set to perform advanced actions. One common need is to set a global variable in Lua to an object the user creates. Many of the class scripts rely on the "fw" variable being set to a framework object the application creates. Fortunately, the Lua command set allows us to easily set this value directly: 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...
macklebee Posted April 1, 2010 Share Posted April 1, 2010 Also, MG has a good starting point to use as reference here Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
Marleys Ghost Posted April 4, 2010 Share Posted April 4, 2010 Be sure to use this version for reference. 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.