lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Ok hopefully this makes sense.
I am working on a game engine in c++ and want to add lua support. I kindof have a basic understanding of how to read a script. What I want to know is using lua can I define types such as the following pseudocode

Type item
Onclick
 Do something

And then subtype the items like this

Type weapon Base item
Onclick
 Equip weapon

So I guess what I'm asking is can functions in lua be overridden and how would I be able to implement this? All suggestions/help/constructive comments appreciated!

Thanks in advance!
-Steve