[PCG] Actor Overrides in Spawn Actor Node

Hi there,

how can I use the “Actor Overrides” functionality to override an integer variable of the spawned actor, that is spawned via the “Spawn Actor” Node in PCG?

That’s what I have:

  • Blueprint with PCG Component. The BP has the variable A = 2
  • In the PCG graph I spawn an actor. This actor has the variable B = -1

I’d like to set the variable B of the spawned actor to the value of variable A (which is 2), so that the spawned actor’s variable B is equal to 2.

I tried to use the “Get Actor Property” node, and I was indeed able to at least debug print that value from the PCG graph. But I was not able to utilize the value in the “Actor Overrides” of the “Spawn Actor” node.

I’d be happy if someone can shed some light on that topic, thank you! :slight_smile:
(I’m on UE5.2)

image

1 Like
  1. You should add a “AddAttribute” node before the “Spawn Actor” node. And specify the “Output Target” variable.
  2. Set the “Input Source[in your picture]” with variable which you just specified.
  3. Remind the “Property Target[in your picture]” is the spawned actor’s property.

Hope it’s helpful

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.