Dig
10-29-2005, 05:38 AM
I'm working on a basic scripted (Lua 5.0) 'game' engine, and part of the concept is that you define an object by creating a table that has information suchs as x,y,z value, size, object type etc., and the pass it to my C++ engine to create the object. I have no problem using objects in C++ and Lua through Lunar class template and can have me engine do all sort of things with the variable passed but can't work out how to make my C++ functions accept a TABLE from Lua and set internal variable based on the values in that table.
Hope that makes a little bit of sense and someone can point me in the right direction to working this out! Can't find any tutorials on this (found ones that recognise a table was passed, but not ones that process the information in the table) and the Lua Manual makes no sense to me.
Cheers,
Nick
www.littlemonkey.co.nz
Hope that makes a little bit of sense and someone can point me in the right direction to working this out! Can't find any tutorials on this (found ones that recognise a table was passed, but not ones that process the information in the table) and the Lua Manual makes no sense to me.
Cheers,
Nick
www.littlemonkey.co.nz