Download

Is component with a tag visible at runtime?

Is there a way to do a check and see if a component with a TAG on the Third Person Character BP is visible at runtime? There are 36 components, but 6 components can be visible at once. Then, store that in Game Save?

My goal is to:

  1. Do a check for what components(tags) are visible on the third person character?
  2. Then, store that tag in Game Save.
  3. When the game is loaded, later, find the tag that was stored.
  4. Loop through the components in the third person character.
  5. Then, turn on the visibility on the mesh that had the component tag?

@MMI_Sean I think you need to keep track of which components are visible. You can tell if they are visible just by looking at the ‘hidden in game’ tick box ( assuming that’s how you’re controlling visibility ).

Hello ClockworkOcean, I was using the Set Visibility. Below is the flow I was using.
If I want “A” to be visible, then I turn ON visibility on “A” and turn OFF visibility on “B” and “C.”
If I want “B” visible, then I turn ON visibility on “B” and turn OFF visibility on “A” and “C.”
If I want “C” visible, then I turn ON visibility on “C” and turn OFF visibility on “A” and “B.”

Thing is, I cannot seem to get access to the tag of the children of the Third Person Character. I can not seem to see the children that are the component of the Third Person Character.
Would using the “hidden in game” help me see the tags or somehow help me see what child is not hidden? That would be cool :), Have you gotten this sort of thing to work for you?

I would love a way to save out what mesh is visible to a string variable (somehow) in Game Save. Then when the next game is loaded, Begin Play would see which mesh is visible and display it on the Third Person Character.

@MMI_Sean You can’t pull a pin from morph_shirt and find something with ‘tag’ in it?

If not, then maybe you need to ‘look deeper’ into the child with something like:

morph_shirt -> getchildactor -> castto morph_shirt -> as morph_shirt -> get tags

?..