# controlling a StaticSwitch with a Float/Scalar/Constant 1 in a Material

**URL:** <https://forums.unrealengine.com/t/controlling-a-staticswitch-with-a-float-scalar-constant-1-in-a-material/299742>\
**Category:** Rendering\
**Tags:** bool, float, unreal-engine, question\
**Created:** [November 24, 2014, 2:29pm UTC](https://forums.unrealengine.com/t/controlling-a-staticswitch-with-a-float-scalar-constant-1-in-a-material/299742 "2014-11-24T14:29:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![DarknesZ](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/darknesz/32/610815_2.png) [@DarknesZ](https://forums.unrealengine.com/u/DarknesZ)\
**Post date:** [November 24, 2014, 2:29pm UTC](https://forums.unrealengine.com/t/controlling-a-staticswitch-with-a-float-scalar-constant-1-in-a-material/299742/1 "2014-11-24T14:29:05Z")

</div>

Hey Guys, i want to control a StaticSwitch with a Float…  
currently iam trying to do this with a IF Node.

 ![22007-static.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/3/1/7312c473ce458bca74c61885056299d47c31cd2e.png)

but i get an errors  
Error [SM5] (Node If) Attempting to perform arithmetic on non-numeric types: static bool static bool  
Error [SM5] (Node If) Cannot force a cast between non-numeric types.

i want to control the switch out of the cascade editor via the dynamic parameter. so it have to be a float.  
is there a way to convert a float to a bool ??

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_759e5c3a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_759e5c3a](https://forums.unrealengine.com/u/anonymous_user_759e5c3a)\
**Post date:** [November 24, 2014, 3:42pm UTC](https://forums.unrealengine.com/t/controlling-a-staticswitch-with-a-float-scalar-constant-1-in-a-material/299742/2 "2014-11-24T15:42:12Z")

</div>

Closing as duplicate: [controlling a StaticSwitch with a Float/Scalar/Constant 1 in a Material - Rendering - Epic Developer Community Forums](https://answers.unrealengine.com/questions/137792/controlling-a-staticswitch-with-a-floatscalarconst.html)
