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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Controlling multiple pawns RTS

I'm building an RTS and am having some difficulty setting up the relationship between the controller and the pawns. I currently use one main pawn as the camera rig that the controller posses from the beginning. After that I want to be able to select/deselect pawns and feed them instructions from the controller. Any advice is appreciated.

Product Version: Not Selected
more ▼

asked May 08 '14 at 05:48 AM in Blueprint Scripting

avatar image

114 10 16 101

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

2 answers: sort voted first

Getting one controller to control all the pawns looks like a bad idea to me. Create an AIController subclass (let's call it RTSPawnController), and create RTSPawnController subclasses for each of your different pawns, and spawn one controller per pawn. Then, have the player controller send commands to these RTSPawnController subclasses. For example, you might have a MoveToPoint function in the RTSPawnController which the player controller calls on selected pawns.

more ▼

answered May 08 '14 at 06:30 AM

avatar image

549 31 36 164

avatar image jfaw Mar 15 '16 at 05:31 AM

Are you really sure that it's a good idea to have each RTS unit have it's own instance of the AIController? Because that means you have many Behavior Trees running at once.

Not that I know what I'm talking about or whatever... I only found this post because I was trying to figure out how to organize the relationship between Behavior Trees, units, and AIControllers. If you're sure that this is the right/best/decent way of going about it, then by all means.

avatar image MiKom Mar 15 '16 at 10:26 PM

Generally, it is a good idea.

I witnessed and profiled this kind of setup in production. Unless number of your units goes into thousands, modern PC shouldn't have any problem with it.

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

There is a user on youtube who has done some extensive videos on RTS and AI movement you should check it out:

https://www.youtube.com/watch?v=kcsF2U84Jhk You may find what you are looking for in his series.

more ▼

answered Mar 15 '16 at 07:35 PM

avatar image

Black Phoenyx
4.1k 165 9 170

(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