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.
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:
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
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.
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