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"

Creating AI for Total War like game (unit formations)

Hello guys!

I've been using Unreal Engine for quite some time and really had no struggle working with games with no AI in both blueprint and C++. But now I want to try to create game which resembles Total War system of one unit (unit formation) having bunch of units. So, to implement it I created spawner actor which spawns 20 units in a row and puts their reference into actor array. Every unit is controlled with instance of AIControlled. It is set when I select any of unit with mouse click I get selected whole array of units through spawner actor and when I right click on map spawner actor is sending DesiredLocation to MoveTo sequence in Behavior tree to each of AIController (with addition to DesiredLocation of their distance between each unit so that they could keep formation in row). So, all is working fine, except that they are not moving simultaneously and they tend to bump into each other, which is breaking formation while moving. How can I fix this? But more important question is what is the best way to create AI so that units will not break formations? Any kind of suggestion would help!

BTW any kind of functions like Simple Move to Location will not do for me, I only want to work with Behavior tree, cause I need complex stuff later.

Product Version: UE 4.17
more ▼

asked Sep 06 '17 at 10:30 PM in Blueprint Scripting

avatar image

118 8 12 15

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

0 answers: sort voted first
Be the first one to answer this question
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