Can you randomise 'Move To Location'?

Hi,

Sorry if this is a stupid question but I am wondering if you can have multiple goals that randomise the Simple Move To Location goal?

I am currently using the get random reachable point in radius but its not what i really want. Could I somehow set a couple specific position and my AI would randomly choose between the goals which one to go to?

This is how I currently have it setup!

Hey TadasJuknevicius,

This is definitely possible. Here’s how you can do this:

What I’d do first is make however many vectors you want. I used 3. Then, create a Vector Array variable and use the 3 vectors you created to set it as shown below:

133133-4-6-2017+8-20-58+am.png

Then, you’ll need to pull off of a reference to your Location Array variable, and then add a Get node. For the index, we’ll want to get a random number, which will pull a random stored vector from the array. To do this, I used a random integer in range node. Keep in mind that arrays begin at element 0, so the range would be 0-2, not 1-3.

133134-4-6-2017+8-24-57+am.png

All you should need to do now is plug the return value of your Get node into your Goal pin on your Simple Move to Location node, as shown here:

This should give you the results you’re looking for, but definitely let me know if it doesn’t work and I’ll take another look at it.

Have a great day!

Sorry for the unbelievably late reply! only just got round to doing it and yes it works perfect and exactly what I asked for :)!! Thanks a lot!!!