I have set up a path following ai car, and I’d like to make more of them with random path options. The base setup was for one path so now if I make more cars they all try to follow the same path. I’ve made a few more splines to pick from, I just don’t really know how to get all instances placed in the game of the path (copies of the same actor) so the cars can choose a random one for themselves. (I guess the path picking also can be separated off of event tick?) This is where I’m at now:
- avoid calling
Get All
nodes on Tick - have a look at the tooltip of that node
Consider the following:
- when the game starts we find all spline actors in the world and make an array out of them - each car now knows about all splines
- we select a random path and store its reference
Current Path
- when a car is ready to choose another Spline, call the Custom Event which will pick another random element from the array and reference that actor in a variable
Current Path
- use the reference to the
Current Path
to drive the car on Tick using the preferred method
Do tell what you think.
avoid calling Get All nodes on Tick - yes, absolutely
yes, thats what i was looking for! thanks