An Efficient Way to "Assign Type" To Objects

Oh, you can store enumerators, inside
another enumerator?

Not really (well, you could wrap everything in structs and then nesting is quite doable, yes).

Here’s what I meant - if you look at the enumeration list, the element position on that list is equal to its int value. So you can treat elements’ positions as ints for comparison purposes.

  • Fire [0]
  • Water [1]
  • Air [2]
  • Earth [3]

Think of it as of an indexed list - the further down your are on the list, the greater your value is.


  • Stone
  • Iron
  • Steel
  • Mithril

The above should make more sense; even though they’re just enumerators, you intrinsically know which material is stronger because of the list progression. So placing them in a logical order gives you extra data to work with. You know Steel is better than Iron because it is further down on the list.

This is not really applicable in your very case because your enumerators carry arbitrary values, regardless of their position on the list. That’s why the original script I posted was needed. But it’s good to know if you need to compare enumerators.


And yeah, introducing just a couple of new elements (Light and Dark) will definitely complicate things more. It will all stack in complexity :slight_smile: Good luck!