Hi,
I know this must be really simple but how do I get the name of a status value such as "HP" or "Strength" from Ork.
I am fine getting the actual values but can't seem to find where to get the name from.

sorry for what I know is a dumb question!!!

Dave
  • Generally, you can get the name via:
    string name = ORK.StatusValues.GetName(id);
    id is the ID/index of the status value.

    Or, if you're already accessing a status value from a combatant, you can do so like this:
    string name = combatant.Status[id].Setting.GetName();
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Thank you:) - I was missing the ORK. in the first or the .Setting in the second
  • Hiya

    Another question,

    How do I access the contents of an item box which spawns in my scene through code.
    (I have copied Fashtas' inventory post and am trying to replicate on a chest)

    thank you
  • Once you've got the ItemCollector component from the game object, you can access the items via the ItemList property. It gives you access to a List that contains all items in the box.

    The IShortcut interface gives you some standard functionality, e.g. to get the name or icon. For more details, you can cast it (after checking if it is that type) to e.g. ItemShortcut for an item or EquipShortcut for weapons/armors.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.