Charrua Posted June 17, 2014 Share Posted June 17, 2014 is it good practice to mix both? does cpp can call lua functions, use lua variables? does lua scripts get access to cpp variables, objects, methods for example, if i made an scene in the editor, attach some scripts to some objects, create and place the camera, etc how can i get the reference to the editor's camera from cpp the other way, if i create the camera with cpp, how can i reach it from a lua script. thank's in advance Juan Quote Paren el mundo!, me quiero bajar. Link to comment Share on other sites More sharing options...
Admin Posted June 17, 2014 Share Posted June 17, 2014 This is kind of an advanced topic, but this is the tool Leadwerks uses to expose its API to Lua: http://www.leadwerks.com/werkspace/files/file/216-tolua/ People have retrieved specific objects in the map by naming them a certain name and using a hook in the Map::Load function. Quote Link to comment Share on other sites More sharing options...
Charrua Posted June 17, 2014 Author Share Posted June 17, 2014 I'll look that carefully when i'll get back home. Thxs I already use a hook on map.load but it has it's limitations. It would be good to have an easy way of intercomunication between both. Quote Paren el mundo!, me quiero bajar. 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.