Path Node - Spawning Actor does not hold Var

Hello,

I am trying to spawn an AI actor to follow a path. If I place the AI into the world, it works great. I have a variable “DesiredNode”, and its value is “PathNode”, which tells the AI to go to the first node in the path. But when I spawn them into the world, the DesiredNode appears, but the value comes in as None. Does anyone have any experience with this and know a work around? I believe its a known bug. I am trying to figure out a way to get the spawned AI to the first node in the path. Any suggestions would be greatly appreciated!

[ATTACH=CONFIG]PlacedInTheWorld[/ATTACH]
[ATTACH=CONFIG]SpawnedIntoTheWorld[/ATTACH]

Thats because you are setting that 1 manually when you place the actor in there. When you spawn 1 it’s not replicating that actor you have spawned, it’s creating a new 1, so obviously that variable should be empty because you haven’t chosen it.

It’s not a bug, it’s just the logicl way things are.

If you want to use that 1 and replicate it then you will need to get that variable and store it somewhere and then set it on the newly spawned actor.

Any chance you could explain that a little more, I tried doing it but I am getting nowhere

You need to put in the blueprint something that sets that value for it. If you manually spawn 1 in the world then save that value and post it over to your game instance or something and then when you spawn the new 1 read that variable from there to set its value on the newly spawned actor

I really appreciate your reply, but if you create a path node, the value is not editable, so there does not seem to be a way to set it somewhere else. Even in a level BP

Triplette took some time and answered my question. Here is his answer. Very awesome on his part!

path-node-variable-unable-to-pull-value-upon-spawn