Need help with counting logic

Very new at Unreal Engine here, and especially new to Blueprints and development in general. Right now I have multiple “switches” that I want to limit having 5 on at time. My current “switch” blueprint works correctly toggling on and off, but how can I communicate to the level Blueprint from my switch Blueprint to limit having only 5 of them in the active state at once?


*This is my switch (“Node”) blueprint. All it does is interact with my material instance changing a parameter. “Active” is the B option, setting the parameter value to 10.

Hi, you could try using the Cast To node. Casting isn’t something I could explain you here, but it’s exactly what you are looking for in this situation.

Here is a link you could check out the get an idea about Casting:
https://docs.unrealengine.com/latest/INT/Engine/Blueprints/UserGuide/CastNodes/index.html

Also avoid doing it in the level blueprint if possible. Several other blueprints that you can be doing it in such as game instance

Where is Spock when you need him :stuck_out_tongue: