# How to do Gameplay Tags pin with parent check if want to replace nested enum

**URL:** <https://forums.unrealengine.com/t/how-to-do-gameplay-tags-pin-with-parent-check-if-want-to-replace-nested-enum/731376>\
**Category:** Programming & Scripting\
**Tags:** tags, tag, ENUM, unreal-engine, Gameplay-Ability-System, editor, Blueprint\
**Created:** [December 19, 2022, 12:04am UTC](https://forums.unrealengine.com/t/how-to-do-gameplay-tags-pin-with-parent-check-if-want-to-replace-nested-enum/731376 "2022-12-19T00:04:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![JunceW](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JunceW](https://forums.unrealengine.com/u/JunceW)\
**Post date:** [December 19, 2022, 12:04am UTC](https://forums.unrealengine.com/t/how-to-do-gameplay-tags-pin-with-parent-check-if-want-to-replace-nested-enum/731376/1 "2022-12-19T00:04:22Z")

</div>

I use Gamplay tags to replace nested enum, representing character states in game, like  
State.Normal.Idle;  
State.Normal.Talking;  
State.Combat.Attack;  
State.Combat.Dodging…

When I use Enum, I cannot have nested structure, and gameplay tags helped a lot on this side. But it brings new problems on the other hand. Since I can input any tag where the orginal State enum pin is, now the compiler cannot check types during compling. I want that pin can be only input with tags with State as their parent like State.xxx. Currently I have to do runtime check like this:

 ![Snipaste_2022-12-18_16-53-27](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/f/8/0f824dd6734ed17d6ea1b67a739937b76127f590.png)

How can I do this check during compling, just like if you try to connet a different type enum to another type enum pin, the compiler will tell you the error?

---

<div class="post-metadata">

**Author:** ![DevinSherry](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/devinsherry/32/1101099_2.png) [@DevinSherry](https://forums.unrealengine.com/u/DevinSherry)\
**Post date:** [December 19, 2022, 11:13am UTC](https://forums.unrealengine.com/t/how-to-do-gameplay-tags-pin-with-parent-check-if-want-to-replace-nested-enum/731376/2 "2022-12-19T11:13:21Z")

</div>

You can use a switch using a gameplay tag as the switch type and check for specific tags; it works like an Enum in that regard.

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/9/1/291369c61206fd84d800d80e6c4090132d324275.png)
