Jump to content

How to? Run LUA from your own C++ Exe


Birdman
 Share

Recommended Posts

  • 2 weeks later...

Mmm..

 

What about commented functions like LoadScript, RunScript, etc?

 

I have Setup LUA OK, but idk how to run a script in my code

 

       TFramework fw = CreateFramework();
       SetGlobalObject("fw",fw);
       BP lua = GetLuaState();
       lua_pushobject(lua,fw);
       lua_setglobal(lua,"fw");
       lua_pop(lua,1);

Link to comment
Share on other sites

You mean someone answered this? I would surely like to know how because as far as I know, you need to include the Lua headers in your application and pass them the state Leadwerks maintains. Last time I checked, there was no built-in command for it.

Link to comment
Share on other sites

  • 2 weeks later...

Yeah i think ZioRed answered this, anyway, i have a working LUA for a driving example code, and i have an exe that have joystick implemented, and i cant put em together to work.

Is something simple, but working with leadwerks seems to be far from simple.

 

What i need is an engine.exe with joystick implemented, my other option is what im finishing now, recoding all my LUA script in c++ becouse im not getting support.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...