# Struct as Enum/Store Variable within Enum?

**URL:** <https://forums.unrealengine.com/t/struct-as-enum-store-variable-within-enum/342804>\
**Category:** Blueprint\
**Tags:** unreal-engine, UE4, question, Blueprint\
**Created:** [December 31, 2015, 1:46pm UTC](https://forums.unrealengine.com/t/struct-as-enum-store-variable-within-enum/342804 "2015-12-31T13:46:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Raildex](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Raildex](https://forums.unrealengine.com/u/Raildex)\
**Post date:** [December 31, 2015, 1:46pm UTC](https://forums.unrealengine.com/t/struct-as-enum-store-variable-within-enum/342804/1 "2015-12-31T13:46:03Z")

</div>

Hello Guys.

Is there a possibility to use a struct-type as an enum?

At the moment I have an enum that indicates in which state the character is:  
Idle  
Falling  
Walking  
Running  
Ledge Hanging

etc.

Now I’d like to store some variables into this enum that indicates if the player can draw/hold a weapon.

Idle-\>true  
Running-\>true  
Swimming-\>false  
Falling-\>true  
Ledge Hanging-\>false  
etc.

---

<div class="post-metadata">

**Author:** ![Daekesh](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/daekesh/32/918652_2.png) [@Daekesh](https://forums.unrealengine.com/u/Daekesh)\
**Post date:** [December 31, 2015, 5:35pm UTC](https://forums.unrealengine.com/t/struct-as-enum-store-variable-within-enum/342804/2 "2015-12-31T17:35:09Z")

</div>

No, it’s not. What you can do is create a ‘movement state info’ struct. Create an array of them, 1 for each enum value. You can then access the info by using the array and the enum as the array index.
