Problem with the AI cars spawner

Hello everyone,

Firstly I want to explain what I want to do. I have an AI car which move by following way points as its path. In the car’s Blueprint I have an editable list of type way point (Actor) so I can pick the way points from the scene. Then, in the AI controller of the car I am retrieving the list from the car Blueprint and I am assigning it to another list which I have create in the AI controller, so I can use this list to control the steering of the car wheels according to the way points location, and every thing is working well.

But what I want to do now is to have a spawner that spawn AI cars, but the problem is when It spawn cars the cars are not assigned way point so they don’t move.

Here is my spawner
8cfadf0a3b27bef9f2a4373236cd11e4090a0ffb.jpeg

I tried to assign the way point from the spawner blueprint instead of the car, and then change the AI controlled and make it retrieve the way points list from the spawner instead of the car, but it give an error. And I don’t know if there is a way to create a static list of way points I tried to assign a default value of the list but it did not work.

The below picture shows how the AI controller was retrieving the list form the car.
a1944c97c8336700903dfff627deb44bdff359a7.jpeg

Then I changed it to this as I want to assign the way points from the spawner blueprint so all the spawned cars can have way points assigned to them. but it is giving me an error.
f540c951dcfabb9b4d11123f57368b7702345bf8.jpeg

This is the error
395acaf6e14f14e34c3fef504703bcc9dd40c3f2.jpeg

If someone can help me in this I will be appreciated, and think you.

I don’t know if this will fix your problem, but you can set the waypoint variables on spawn instead of after spawning the Hatchback BP. To enable this, click on the Variable and enable Expose on Spawn in the details panel. Now you should be able to set that variable through the Spawn From Class node.

drb1992 thank you very much, I already have tried to put the way points array in the spawn but the problem when I try to access the array from the AI controller of the car it gives me this error

f540c951dcfabb9b4d11123f57368b7702345bf8.jpeg

395acaf6e14f14e34c3fef504703bcc9dd40c3f2.jpeg