Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to make an object in Lua that can be pulled from a table?

Asked by 3 years ago

I looked at the OOP tutorial and am trying to understand meta-tables but I don't quite get it. Specifically I'm trying to make a card that has a few values on it, say the name, damage it does, and condition it gives. I want to make a set of those that can be equipped and such and I think the best way to do that is to have a table that I can pull from that contains all the cards in the game. That way whenever someone gets a new card or equips a card, I can just pull it from the table instead of having to create it every time someone gets it.

can someone help me a little?

Answer this question