Search found 2 matches

by Firehawk
Tue Dec 13, 2016 9:53 pm
Forum: Support and Development
Topic: Metatable issue
Replies: 8
Views: 5584

Re: Metatable issue

I had to make an assumption in here, but here's what you asked for as far as I could figure out --Vector implemented globally. With the implementation suggested, this must be a global or else the metamethods don't know what a --vector is. Take a look into scope if you want to know more on this. vect...
by Firehawk
Sat Dec 03, 2016 2:16 pm
Forum: Support and Development
Topic: Help with OOP
Replies: 11
Views: 7285

Re: Help with OOP

I think this is what you were looking to do item_mt = {} --This sets up item_mt as a lookup. --__index is a metafunction which is only invoked if an index does NOT exist in the main table. item_mt.__index = item_mt --We can define a function on the base. function item_mt:base_cool_function() print(&...