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"

Moving TopDownCharacter with AIController triggered by PlayerController

Hi all, I have a little Problem with AIController in a RTS-Game-Approach. The TopDown-Template didnt suite my needs so i came along **this** Article frome Gustavo Maciel and tried it like in the following picture.

alt text

I created a SpectatorPawn with a CameraComponent, which is not attached to the Character like in the Topdown-Template and made it starting Pawn. All good on this side. My problem is on the AiController/CharacterPawn side. My intend was to put a SetupInputComponent into PlayerController. Through Mouseclick the PC was supposed to trigger a Function in AIController. AIController was supposed to decide what happens with this click and how it moves the Character or where. But i cant trigger Functions in AIController. I just cant simply initialise an Object from AICOntroller in my PlayerController to start the Movement.

Now i dived into this and saw, that a lot of stuff in or with AIController is working from the start of the game, or directly after spawning a Character and possessing it. what actually makes sense, because AIController should be independent from Player input. So is my approach wrong or am i just stuck or getting something wrong? Is there a way calling AIController like getting Controller or PlayerCHaracter? How can i get it working, like its shown on the Picture?

After some months im still fairly noobish with UE4 and C++, I hope i didnt miss an obvious thing here.

Product Version: UE 4.10
more ▼

asked Jan 23 '16 at 02:13 PM in C++ Programming

avatar image

56 4 7 17

(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