VeTaL Posted October 4, 2010 Share Posted October 4, 2010 How can i do subj? For example, i have state control of the game (menu and so on) on C++ and game logic is written on LUA. Quote Working on LeaFAQ Link to comment Share on other sites More sharing options...
Canardia Posted October 4, 2010 Share Posted October 4, 2010 You should do only generic logic and behaviour in Lua, and game specific logic on the Lua entities in C++. From C++ you can access any Lua entity using FindFirstEntityByKey("name","enemy_9") (see gamelib). Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
Pixel Perfect Posted October 6, 2010 Share Posted October 6, 2010 You should do only generic logic and behaviour in Lua, and game specific logic on the Lua entities in C++. Only because that's the way LUA has been implemented in Leadwerks. But that's at odds with the way it is done in most of the gaming industry where scripting is very much used to control the AI and game logic! My aim is to expose all my C++ functionality to LUA so this can be scripted but accept I need to implement that myself. 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...
VeTaL Posted October 22, 2010 Author Share Posted October 22, 2010 Okay, but can i add new method in LUA? For example, i want to inherit from existing entity, add some new methods and see them in C++ Looking like i need to add luabind? Quote Working on LeaFAQ 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.