In my game, when the player clicks on an inventory item, I want him to succeed a test before he can equip. Because of this, I can't use the "Use" default action in my inventory menu, since the item can't be always equipped (i.e. the player fails the test). Because of this, I tried to use the Game Event default action, but I realized that when I do that, the inventory item is no longer deactivated when it does not meet the equip requirements of the item in question. I'd like to have both Game event action AND the item availability display. Is that possible?

Also, when I use a game event as the default action, I have to specify the body part where I want to equip the item. However, this is dependant on every item. For example, a shield will equip on the left hand, while a sword will equip on the right hand. However, I don't know how to distinguish an item type in a selected data (because the item is set as a selected data named "action"). The only workaround I found is to use a custom event on the item and call that custom event from the selected data. Is that the best/only way to proceed?

Thanks!
  • No, that's not possible - though you could probably use the equipment's equip game event to do checks upon equipping and unequip it again.
    In the equip/unequip game events, the equipment is available as selected data via the action key, the combatant who's equipping/unequipping as Starting Object actor.

    As for equipping - usually, equipping without a specific part will equip it on the first part it can be equipped on. E.g. if your shields are set to only equip on left hand, that's where it'll be equipped on.
    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!
  • Thanks Gil!

    When you talk about equipment's equip game event, what do you refer to exactly? In the weapon settings, I have a custom event and in the inventory menu, I have the default event, which I set to Game event. I'm not sure which one you talk about.

    As for equipping, I currently use the Change Equipment node and I have to specify a body part. Is there another way to specify I just want to equip this item on the first available body part?

  • I'm talking about the equip event you set up in the individual weapon/armor.

    Ah, yeah, the Change Equipment node only allows for fixed equipment parts. I don't think there's currently another way in the event system.
    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!
  • Will add an option to use the first available/usable equipment part to the node in the next update.
    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!
  • Sorry about that, but I don't see any Equip Event in the Inventory/Weapons/Individual weapon setup. Only custom events. Do you refer to that?

    As for the new option you plan to add, this is a great idea!
  • They're in the equipment's Level Settings, since they're set up per level.
    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!
  • Thanks! Now, if I want to use the OnEquipmentChanged callback on a combatant, what is the best way to get the item that is equipped since this callback, contrarily to OnInventoryChanged, only has the combatant as parameter?
  • I don't think there's currently a way to know that.
    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!
  • Ok, do you think you could implement a signature that could mimic that of the OnInventoryChanged?

    If not, I guess I could use the Equip event in the weapon settings and, from there, use a call function node with the weapon name I got from action selected data as a parameter... I’d miss the body part however...
  • I can add something in the next update.
    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!
  • Nice! Thanks!
Sign In or Register to comment.