Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Can you randomise 'Move To Location'?


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! alt text

Product Version: UE 4.14
simple move to.png (89.7 kB)
more ▼

asked Apr 06 '17 at 11:18 AM in Blueprint Scripting

avatar image

60 17 16 17

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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:

alt text

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.

alt text

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:

alt text

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!

more ▼

answered Apr 06 '17 at 12:27 PM

avatar image

Sean L ♦♦ STAFF
43.5k 485 152 442

avatar image KebabCritic May 06 '17 at 11:19 AM

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!!!!!

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question