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 to create multiple characters to switch between in a project?

I'm still really noob at this, learning for a school project. Anyway, I've set up my character "FirstPersonCharacter" and gave it unique values. There are going to be 3 more characters. I would like to create them by duplicating the character I already have and then tweaking the character movement, etc.

Also as an extension to that question, I'm not sure how to switch between multiple characters in the editor for playtesting.

If there is another way I should go about this, then please let me know.

Product Version: UE 4.13
Tags:
more ▼

asked Oct 13 '16 at 05:57 PM in Using UE4

avatar image

rms0020
1 2 4

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

1 answer: sort voted first

Hey rms0020,

An easy way to do this is once you have duplicated your characters, give them names, say Character02, Character03, and Character04. Place an instance of each in your level.

Then, in each character, run a setup such as this:

alt text

What I'm doing here is on a key press, I'm getting all actors of each class (so for example, Character01 would get all actors of Character02, Character03, and Character04, one class per key press). After I have the array of actors, I get the first one (this will only work if you have one of each in your level, if you have more you'll need to do a bit more work). After this, I get the player controller and place a possess node, connecting the reference to the character I got from the Get All Actors of Class node.

Now, repeat this same process in each character, replacing the reference that would be to the character's self (meaning that for Character02, we don't want to get all actors of that class because we already are possessing that class, so use Character01 instead and so on).

After this, compile & save the blueprints and play your game. You should possess whichever character that you press the corresponding key for.

Let me know if you have any questions, and have a great day

possess.png (166.4 kB)
more ▼

answered Oct 13 '16 at 06:08 PM

avatar image

Sean L ♦♦ STAFF
43.5k 485 152 442

avatar image rms0020 Oct 13 '16 at 06:56 PM

Thanks! I'll go and try this out. But first, how do I actually duplicate the original character? He's not something in my main viewport, at least that I know of. alt text

char.png (416.7 kB)
avatar image Sean L ♦♦ STAFF Oct 13 '16 at 07:01 PM

No problem! That's simple, actually, you can just select the blueprint in the content browser and press CTRL+W to duplicate it.

Hope that helps

(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