Announcement

Collapse
No announcement yet.

Path Node - Spawning Actor does not hold Var

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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!

    Chris

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

    #2
    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.

    Comment


      #3
      Originally posted by ZoltanJr View Post
      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

      Comment


        #4
        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

        Comment


          #5
          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

          Comment


            #6
            Rudy 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

            Comment

            Working...
            X