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. 

How would i duplicate an Ai character?

What is the best way to duplicate an Ai character so that i can use the same set up with another character?

Product Version: UE 4.22
more ▼

asked May 10 '19 at 09:29 PM in Using UE4

avatar image

29 4 10 14

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

1 answer: sort voted first

Are you asking about making a duplicate in runtime? Or you need to make a duplicate of a blueprint in the editor?

In the first case, it's better just to spawn a new character from the same blueprint/class as the first character.

In the second case, you have 2 options:

  1. Duplicate the blueprint (will be a completely separate blueprint)

  2. Make a child blueprint (will inherit all the changes made later in the parent blueprint)

(assuming you're using blueprints, not c++; though the idea would be the same)

more ▼

answered May 10 '19 at 10:24 PM

avatar image

430 11 18 25

avatar image Connormcfarland May 11 '19 at 02:41 PM

I am trying to duplicate a character blueprints to have multiple characters. i created a child BP of the AI character and placed him in the world, but it seems that ALL of the AI characters walk in the same direction even tho they are set up to "Get random point in nav radius" not sure why.

avatar image norlin May 11 '19 at 02:50 PM

It seems you're confusing different concepts. Blueprints are classes, you can spawn any number of characters (instances) from the same blueprint. E.g. if you just need to have multiple similar characters, you don't need to make different blueprints for them (unless you want to have a difference in their setup).

For the "Get random point in nav radius" you can use Debug String to output the resulting coordinates so you can see where exactly they all are going (assuming it will be zero coordinates). To use this method, you need to setup navigation stuff in your level:

avatar image Connormcfarland May 11 '19 at 04:25 PM

okay so i messed around with some blueprints and got the Ai working decently. BUT, the Ai stops after maybe 25 seconds or so and i cant fiure out why. is there a "loop blueprint" or something of that nature so it just keeps on runnin?

avatar image norlin May 11 '19 at 08:42 PM

What exactly do you want to make? If you need to send the AI character to a random point, then you can use AI MoveTo, it has a callback "on success" which is triggered when the goal is reached.

Other way is to use Behavior Tree, it's suitable for a complex AI logic.

avatar image Connormcfarland May 13 '19 at 03:12 PM

i was just messing with some node placement and it seems to be working fine. the Ai's are all walking in separate directions now. but im honestly not quite sure what i did... haha. anyway thanks so much for your help!!!

(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