Hello. I create a simple light on/off mechanic. I want the light to come on when I press E. When I wrote this code in the Işık class, it did not work. When I write to the character class, it gives an error. Which is the right way? What should I do?
Write it in the Light Actor class.
When the character hits E have it interact with what’s in front of it.
Use BP Interface to communicate between the actors.
Your code above is failing because Set Visibility needs a reference to the Light Actor component (Target).
Is there a tutorial to do this?
Part 1 of the tutorial shows how to setup a line trace based interaction system. It includes BP Interface.
Part 2 expands on the interaction system (upgrades), plus shows how to do networked doors. Part 3 expands on it some more.
I highly recommend you do this in a clean project to learn. Also recommend you use States, as shown in the door tutorial, for your lights.
Thank you!
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.