Getting an item from inventory: ItemShortcut item = combatant.Inventory.GetItem(id); id is the ID/index of the item (in the editor).
Getting an ability: AbilityShortcut ability = combatant.Abilities.Get(id); id is the ID/index of the ability (in the editor).
Both return their respective instances of an IShortcut interface, which provides the Use function to use the item/ability, e.g.: ability.Use(user, targets, useAction); user is a Combatant that will use it. targets is a List of the targets to use it on. useAction is a bool, which determines if it'll use an actual animated action (true) or just do the calculations (false).
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!
Still looking into the skill part.
Not sure what "checkParent" is for though.
ItemShortcut item = combatant.Inventory.GetItem(id);
id is the ID/index of the item (in the editor).
Getting an ability:
AbilityShortcut ability = combatant.Abilities.Get(id);
id is the ID/index of the ability (in the editor).
Both return their respective instances of an IShortcut interface, which provides the Use function to use the item/ability, e.g.:
ability.Use(user, targets, useAction);
user is a Combatant that will use it.
targets is a List of the targets to use it on.
useAction is a bool, which determines if it'll use an actual animated action (true) or just do the calculations (false).
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!