Object_Cont=mvGetObjectController() --something like this would return a pointer to the object system from the engine
i=Object_Cont:mvAddItem("heart")
Object_Cont:mvItemPos(i,400,400)
Object_Cont=mvGetObjectController() --something like this would return a pointer to the object system from the engine
i=Object_Cont:mvAddItem("heart")
Object_Cont:mvItemPos(i,400,400)
That looks like it should work, but you might want to make it that mvGetObjectController() or whatever the function will be called returns a reference, that way it definitely will work. I believe that this is how the ES lua engine used to work.
Quit procrastinating and make something awesome.
Ducky wrote:Give a man some wood, he'll be warm for the night. Put him on fire and he'll be warm for the rest of his life.
I cant figure out how to pass an object reference to the lua stack. How would you do it with tolua++? All i've done so far was bind the class to lua. Im stumped
EDIT:
I was able to create functions that access the object by defining the item system object as global.