how can I make a reference to the object to the main character

how can I make a reference to the object to the main character. let’s say if the object is already on the map, then I can specify an object from the world in its BP, and the main character first appears in the world, that is, I do not know how to give him a link to an object from the world.

Hey @228Arseniy228!

To get a reference of an actor inside your level, you can use the Get All Actors of Class node, select the actor class from the dropdown menu inside the node, then drag a Get node out of it’s Out Actors pin, leave it’s index as 0, and connect it to the Object pin of a Cast To node. To reuse, you can right click on the As [Example] pin of the Cast To node and hit the Promote to Variable option on the menu that pops up.

Hope this helps :innocent:

2 Likes