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!
  • edited March 2016
    So I kept digging around and found that I could do the following:

    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)
    Post edited by deckrocket on
  • ORK.Game.ActiveGroup gives you access to the currently active player group - which has various functions to get members of the group.

    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.
    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.