How can I combine these 2 pins?

I’m following a tutorial and apparently, this can be done:

I’m trying to combine GetActorLocation and BP Npc Data Pro Component together into a SET Variable but I don’t know how. I can only do 1 pin at a time for some reason. Thank you.

cap2

Drag from the pin on the npc variable and search for getactorlocation. Then, right click on the yellow pin on the right of getactorlocation and select ‘promote to variable’.

sequence

If I read the request correctly, that’s not what they want.

It might be that what they want is some Set node that updates two variables at the same time? There’s no way in the editor to do that.

What the graph on the top is actually doing, is set the “NPC spawn location” on the “Target” actor.
To do that in the editor, simply right-click on the BP Npc Data Pro Component, and select a “set” variable from there. This will let you set a variable of the actual component instance, rather than the calling blueprint.

image

image

2 Likes

Nah. The variable belongs to the component.

1 Like

ty for the response but in this case it doesn’t work. The pin immediately detaches itself.

It says: BP Npc Data Pro Component Object Reference is not compatible with actor object reference.

This.

Imo the question is a lot more basic: Drag from BP Npc Data Pro Compronent and search for NPC Spawn Location. If you can’t find it, then you need to create it in the component (or keep following the tutorial?).

1 Like

There is no target on the variable because it’s derived locally and therefore doesn’t need a target because it’s referencing itself.

The first example must be calling a variable that is public and instance editable outside of it’s own blueprint. And get actor location doesn’t work on components. You’ll need to use GetWorldLocation.