# Gas Mask overlay : Change via Helmet

**URL:** <https://forums.unrealengine.com/t/gas-mask-overlay-change-via-helmet/460298>\
**Category:** Rendering\
**Tags:** overlay, unreal-engine, mask, UI, Widget, Blueprint, question\
**Created:** [January 8, 2020, 1:56am UTC](https://forums.unrealengine.com/t/gas-mask-overlay-change-via-helmet/460298 "2020-01-08T01:56:16Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stalecheeto](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Stalecheeto](https://forums.unrealengine.com/u/Stalecheeto)\
**Post date:** [January 8, 2020, 1:56am UTC](https://forums.unrealengine.com/t/gas-mask-overlay-change-via-helmet/460298/1 "2020-01-08T01:56:16Z")

</div>

Hello all. I’ve been wrestling with widgets for awhile now. I can’t seem to get this working properly.

I’d like the widget to change accordingly depending what helmet the player is wearing.  
Example :  
No helmet = No overlay  
Gas mask = Gas mask lens overlay  
Motorcycle helmet = Smudgy plastic visor overlay

I was able to get one working, but it’s pretty static for all of the other helmets. Should this be handled inside of a struct or a data table?

---

<div class="post-metadata">

**Author:** ![Max\_Payne](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/max_payne/32/1088663_2.png) [@Max\_Payne](https://forums.unrealengine.com/u/Max_Payne)\
**Post date:** [January 8, 2020, 10:11am UTC](https://forums.unrealengine.com/t/gas-mask-overlay-change-via-helmet/460298/2 "2020-01-08T10:11:36Z")

</div>

Can you post your implementation? iIts hard to say whats wrong, how are you reusing your widget? You could map your outfit classes(good to have some id) with structs and init your widget when outfit changed. Having struct allows your to add some features in the future (stats?)

---

<div class="post-metadata">

**Author:** ![Blackforcedragon](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/blackforcedragon/32/1010299_2.png) [@Blackforcedragon](https://forums.unrealengine.com/u/Blackforcedragon)\
**Post date:** [January 10, 2020, 9:07pm UTC](https://forums.unrealengine.com/t/gas-mask-overlay-change-via-helmet/460298/3 "2020-01-10T21:07:29Z")

</div>

make the overlay as an texture and add it to a widget and add the widget to viewport when your character has the mask on and remove the widget when the player take the mask off.

---

<div class="post-metadata">

**Author:** ![Stalecheeto](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Stalecheeto](https://forums.unrealengine.com/u/Stalecheeto)\
**Post date:** [January 11, 2020, 7:22pm UTC](https://forums.unrealengine.com/t/gas-mask-overlay-change-via-helmet/460298/4 "2020-01-11T19:22:44Z")

</div>

Sorry for the late reply, life got the best of me.

Here’s my setup. I have different helmet blueprints and was hoping to set the unique widget on each particular helmet

 ![295201-problemo.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/a/9/9a9508a1cc7ce007311a7bb481cc849b439aba8c.jpeg)

---

<div class="post-metadata">

**Author:** ![Stalecheeto](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Stalecheeto](https://forums.unrealengine.com/u/Stalecheeto)\
**Post date:** [January 11, 2020, 7:24pm UTC](https://forums.unrealengine.com/t/gas-mask-overlay-change-via-helmet/460298/5 "2020-01-11T19:24:59Z")

</div>

It’s basically like that right now, I have the Player Unknown’s Battleground helmet so when that’s worn, you only have a small opening to see out of, where as a motorcycle helmet has much more visibility.

I have already created the overlays & widgets, just need to pop the code into the helmets.

---

<div class="post-metadata">

**Author:** ![Blackforcedragon](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/blackforcedragon/32/1010299_2.png) [@Blackforcedragon](https://forums.unrealengine.com/u/Blackforcedragon)\
**Post date:** [January 11, 2020, 7:30pm UTC](https://forums.unrealengine.com/t/gas-mask-overlay-change-via-helmet/460298/6 "2020-01-11T19:30:11Z")

</div>

You can use a widget switcher for this, and so you dont need to use more the 1 widget.

---

<div class="post-metadata">

**Author:** ![presto423](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@presto423](https://forums.unrealengine.com/u/presto423)\
**Post date:** [January 11, 2020, 7:41pm UTC](https://forums.unrealengine.com/t/gas-mask-overlay-change-via-helmet/460298/7 "2020-01-11T19:41:42Z")

</div>

Switch Actor could help if toggling visibility of sub-features for each widget, or even for the whole system switching from one helmet / headpiece to another.

> **[Using the Switch Actor](https://docs.unrealengine.com/4.27/en-US/WorkingWithContent/Variants/SwitchActor/)**
>
> Use the Switch Actor to quickly toggle visibility between mutually exclusive child Actors.
