You can use functions aswell. All Lua types are created equalLugen wrote:I had no idea. That's really interesting.S0lll0s wrote:If I understand your question correctly, yes, you can use userdata as table keys.Lugen wrote:
EDIT: Looked again at your example code and realized "img" is both userdata and a table key. Can you actually use that as a field?
Advice on making a level editor
Re: Advice on making a level editor
Re: Advice on making a level editor
And it works! Now I can fetch the necessary userdata for my entities when loading the level again, and when saving I only need to determine by the type of the userdata which table to look at for the metadata. I can assign the userdata to my components directly as usual.S0lll0s wrote: You can use functions aswell. All Lua types are created equal
So now it seems I can move forward.
Who is online
Users browsing this forum: Bing [Bot] and 1 guest