Hello! I have been working on my combatant equipment and displaying changes made to the prefab when items, such as armors are equipped. I understand that a common method of doing this is by disabling or enabling desired meshes on a prefab which contains all the meshes. This is where I seek guidance.

I've done some playing with Ork's equipment viewer feature and I have come to the conclusion that it's really made for basic attachments and not made for rigging meshes to bones (I tried creating an "empty" skeleton without any meshes and adding meshes with the equipment viewer - body parts such as the chest or hips clearly weren't going to work)

Based on my experiences, I see that the best option for me moving forward with my modular character combatant is to invoke this common method for displaying armor by "disabling" all available meshes and enabling only the desired one. I see that under Inventory > Armors > [item] > Level Settings, that there are fields for including "equip" and "unequip" game events. Is this where I am able to produce events which will hide all of the meshes for that item slot and then show only the desired mesh?

I apologize for the exposition, looking for any guidance though. Thanks!
  • edited August 2021
    I'd say the best option is to use Game Object Manager components on your combatant's prefab and control this via object variables. The manager can enable/disable game objects based on defined conditions.

    The equip/unequip events of your equipment can be used to set the variables accordingly. Enabling/disabling child objects directly in the events would only work when changing equipment, but e.g. not do it when changing scenes and the combatant respawns in the next scene.
    Post edited by gamingislove 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!
  • edited August 2021
    Thanks for the help!

    I am having some problems communicating variable changes to my Game Object Manager.

    I see that the Game Object Manager works automatically, as long as a certain condition variable is valid, it will automatically enable prefabs in the "game objects" array. If the condition is not valid, game objects in the array are disabled.

    I have setup a Game Object Manager component in every variant prefab. My hierarchy looks like this: (Chr_Torso_Male_00 is enabled as my default and the rest are disabled)

    https://ibb.co/XppzMwx

    In the starting equipment, I have my "Test Armor" and I have attached an event to that item when it is equipped. This event simply changes an object variable on the prefab (the same variable that is used in the Game Object Manager variable conditions):

    https://ibb.co/jVSJFVN
    https://ibb.co/mNvvN7z

    The problem I am running into now is that it appears the Game Object Manager is disabling my default variant prefab, I'm guessing because it doesn't see the variable condition as being valid. It also doesn't seem to be enabling the prefab associated with my Test Armor:

    https://ibb.co/LdpBB5s

    I have yet to setup an event which disables all other prefab variants when I equip a new armor.
    Here is my in-game result (very obviously):

    https://ibb.co/WvyYjtr

    Any guidance on how I might get the event system to communicate variable changes to the Game Object Manager correctly?


    Post edited by peppermintpatty on
  • edited August 2021
    Don't change the variables on a prefab in the equip event, set up a Starting Object actor and change the variables on that - this is the combatant the equipment is equipped on (or unequipped, in the unequip event).
    Post edited by gamingislove 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!
Sign In or Register to comment.