Referencing ActorBP in world from CharacterBP

I want to send a message to a ActorBP[pointlight in world] from my FirstPersonCharacter BP. How do I do this? Like link them?

Look into Blueprint Interfaces.

Alright, So that is what I am looking for I think but when I try go to Level Blueprint that option is not there only on normal blueprints and I cannot add the blueprints I need to link? :C

You add the interface to your character BP and the other actor’s BP, not level BP.

If you can give more information on what you want to do there may be a simpler way.

What I am trying to do is just know how to communicate from my character BP to an actor… I set up a test enviorment for interacting with obejcts. When the character looks at a object and presses E [interact button] it checks what object is named. then sends the commands for the object to do what the interact is suppose to trigger. For testing purposes I set up a box and pointlight When box is interacted with it tells the pointlight to turn on. The script is in the character blueprint cause there will be a large amount of objects that you can interact with so when you “interact” with the box it is suppose to send a signal to the light to change the intensity to 100,000 but I dont know how to make them connect with each other.

Assuming that you are using a line trace to interact with the light BP you get the hit result of that line trace > drag from Hit Actor pin > Cast to pointlight BP. From this cast you can have access to the variables and custom events you set in that pointlight BP. So you can either create a custom event in the light BP that sets intensity to desired value or you can get the intensity in your character BP via cast to and set it in character BP.

I am going to have a lot of different things that the character can interact with so that is not something I could do. I was going to make a ReturnNode as seen and it would sort through what category the Actor falls under EX: A knife would be a weapon so allow player to pick up knife. OR A button would be a switch so allow player to toggle light.
I just need it to cast to the PointLight’s actor blueprint to lower the intensity of the light.

In that case something like this should work…dont use actor names for that, use tags instead. You can give Interactable tag(or whatever word you pick) for those BP’s and then use Actor Has Tag function to compare the hit actor. Then you could send interface messages to those BP’s depending on those bool results. I can post a screenshot of a basic setup by tomorrow if you cant manage it by then.

What do you mean “use tags instead”.

https://docs.unrealengine.com/latest/INT/Gameplay/HowTo/FindingActors/Blueprints/index.html#getspecificactors

OMG THATS AMAZING

Alright So I added the tags, Interactable [First Check if its a interacable object] and Weapon or Switch to my actors in the level. I do still dont know how to make the certain interface pop up so I can link it as it only shows random blueprints that arnt even in my content folder? and doesnt show for instance “LightPoint_1” which is my LightPoint blueprint I need to access to change its intensity

Here is a sample project for you. The player can interact with 2 different BP’s depending on their tags. Check out the character BP to see how it works and let me know if there is anything you dont understand.

I looked into it and I undestand it all of what you did but I am going to have my lights connected to a light switch not under the same blueprint, EX you interact with a cube and it switches on a light under another blueprint. How do I do this? :confused: It doesnt work. Is it not possible?

EDIT
Alright so I figured out how I am going to do this as its not that complicated and it works. The was you have your light set up is how I am going to do it. I have the light point with a trigger in the same bp I dragged out a trigger and moved it around in the blueprint to align with a “Switch” in the real world so it is just overlapping it. The “Switch” is just a cube with no code on it so you have something to target and it draws a line then excutes back to the same bp to tell the light to toggle on or off. Post closed! :slight_smile:

Quite simple really. You just need to use a BP interface in light BP and cube BP, and then fire this intrface from the cube BP with a custom event when the trace hits the cube. Here’s the updated project:

using interface is sooooo helpful and useful thank you! Can you please check out my other post relating to attaching a weapon as no one is noticing it and thats the only problem I am running into prevent me from progressing my game.