Hi there,
I'm trying to equip my teammates with different weapons/items/abilities through scripts.
I figure I can use:
http://orkframework.com/tutorial/howto/accessing-a-game-objects-combatant/to get them in the first place - but if I'm just in a menu trying to outfit my team and the objects are not instantiated is there a good way to do this?
I also didn't see anything in the API for Combatants to be able to Set weapons/items/abilities. Is there a way to do this?
Thanks for any help!
ORK.Game.ActiveGroup.Leader.Inventory.AddEquipment(new EquipShortcut(EquipSet.Armor, 0, 1, 1), true, true);
ORK.Game.ActiveGroup.Leader.Equipment.Equip(0, new EquipShortcut(EquipSet.Armor, 0, 1, 1), null, false);
But I'm still unsure how to do this for other people in my party (or how to get actual equipment from my inventory instead of creating equipment with the EquipShortcut on the fly)
E.g. this code will get you a list of all battle group members:
List<Combatant> battle = ORK.Game.ActiveGroup.GetBattle();
You can access a combatant's inventory through combatant.Inventory.
Generally, I'd advise using the event system, as all this functionality is already implemented there.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!