I bought a kit of assets and I wanted to make my light switch activate the ceiling lamp but I couldn’t figure out how to make them communicate with each other. I tried connecting them to a Blueprint Interface too following a few tutorials.
Hey @KatelynBell
- First lets make sure that the interface is being called on the switch. Place a breakpoint at the FlipFlop node (right click over the node and Add Breackpoint) and report back if it stops there when the pawn interacts with the switch.
- How are you assigning the reference to LightSwitchSwitch varaible? Are there any Access None errors in the Output Log?
- For the lamp material, create the dynamic material instance in the Construction Script or BeginPlay and store it as a variable. Then use the varaible to modify the parameters.
Hey @KatelynBell!
Aside from @pezzott1 's debugging steps above, I thought leaving this older post of mine could also be helpful, since the topics are pretty similar. Here it is!
The objectives might be different, but you can use it to see how I handled the communication in such a context.
Hope this helps
Hey @pezzott1
I added the breakpoint to the flip flop for my light switch switch and it stopped the interaction and pulled me to the FF node soon as I interacted with it.
I didn’t have any errors. With the reference, I assume you’re talking about this. If I am wrong, then elaborate on what you mean. I don’t have a lot of programming knowledge.
I also made a dynamic material instance in the construction script.