I’m confused.
Lately I’ve been trying to create a system for lighting.
I wanted each spotlight to be controlled by a switch, a breaker, a main breaker, and a control panel.
At first it went successfull, and it still kinda does. I made a level just to experiment with that, and there it works completely fine, but once I open the actual game level, it doesn’t work. It’s the same blueprints and all, but the light never toggles.
This picture above is the lighting. Each and every light source will have this pasted into the event graph. This casts to a variable that checks an assigned object in the level. I will get deeper into that. But this lets me chose which switches and breakers control what lights. If the cast fails, it jumps over to the next cast, leaving me with the posibility to leave out a breaker if I desire to do so.
Here is an example, including the variables. Again, each variable holds an assigned switch or breaker in the level.
Here is how each light appear in the editor. Each light can have separate objects selected. Now, the blueprints are set up in a way that can only hold four objects, and each variable has to be the specific kind. The switch variable only accepts switch blueprints, the sub breaker only accept sub breaker blueprints, but they all work the same, except the name of the bool that decides if the switch is on or off.
This is inside the switch blueprint. Very simple, but it works.
I know that the entire setup is a bit weird, but I’m experimenting a bit. Still, it works completely fine in the Test level, but in the actual game level it don’t, even with the same blueprints
I have simulated the lighting, and it appears that it isn’t getting any info. The cast always fails, and jumps to the next execution node.
Sorry for the long post, but I wanted to be as clear as possible. If anyone have any idea what the problem might be, I would love to hear from you.