Heyho, Im just getting started with Unreal and Im kinda lost as I find the official documentations totally not helpful. This is my situation:
I want to create an asymmetrical multiplayer game and I just want to test a few things for now. Lets say theres the good guys and the bad guys. For testing purposes I wanted to create a little level where I can switch between the roles. So I made another blueprint with a trigger box and two copies of the default thirdperson character. (One for the good guys and one for the bad guys)
The idea is that when I run into the trigger box as a good guy the good guy actor gets destroyed, a bad guy actor gets spawned and I control the bad guy now. Since they both derive from the standard third person blueprint they are controllable characters and when I spawn them in by setting the “DefaultPawn Class” to my good guys it works. I can run around as a good guy. And I managed to spawn bad guys when I step on my trigger. However I am absolutely clueless as to how I let the game posses this newly spawned bad guy. I saw there used to be some kind of posses/unposses functions in UE but they seem to be heavily outdated. Im running version 4.23.0
My idea was to use the “enable” input function on the newly spawned character. But it demands to know which player controller should be used of course. I found functions to get the player controller from an index, but not how to get that index from a character. Soooooo how do I tell the Engine that the player controller that was responsible for the good character i stepped in my trigger volume with is now responsible for the newly spawned bad guy?
And keep in mind this needs to be Mulitplayer useable.
And if you guys have some advice on good online sources explaining GameModesGameModes and PlayerControllers for UE4 further then Id really appreciate if you could send that my way. Im used to the official Unity documentation which is great because it also always provides examples on how to use each function. But im totally lost with Unreal tbh…
Help is much appreciated!