x

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"

How do I assign a Spawned AI Controller, to a Spawned Pawn?????

I was told for each Character Pawn I have spawned into my Game, I will need an additional AI controller spawned with it..

Ok so if I were to spawn an AI controller using blueprint how do I then "Assign it" to a specific Pawn in my game?

Really really would appreciate any help

Product Version: Not Selected
Tags:
more ▼

asked Feb 12 '19 at 03:35 AM in Blueprint Scripting

avatar image

AXlOM
40 1 5 8

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Ok after repeatedly asking this question in different forms for 3 days it finally clicked, I understand now, I see the light.

For everyone else making an RTS game if you want to talk to your Character pawns that you have spawned, its easy.

Step 1: Spawn your Character Pawns any ol' way you want. Make sure to check "Disabled" for "Auto Possess AI" in your characters "Pawn" setting's.

Step 2: When you select the actor for the first time by a direct click or a selection Rectangle, using the Spawn Actor node, spawn another generic AI Controller into the world followed by a "Possess" node., the target is the Controller you just spawned, and the pawn is the Character you wish to command (Which is just Self if your clicking it directly and using the "Event Actor on Clicked event").

So when you click on a new character it creates its AI controller, and then you possess that pawn with that controller, and then you are able to communicate directly with that pawns controller, and therefore that pawn.

more ▼

answered Feb 12 '19 at 05:01 AM

avatar image

AXlOM
40 1 5 8

(comments are locked)
10|2000 characters needed characters left
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