Hi !
I am trying to create a GameMode in which I want players to be switched automatically from possessing the DefaultPawn to posses DefaultSpectatorPawn UPON the DEATH of DefaultPawn.
How would I do that?
Thanks in advance!
- Vlad
Hi !
I am trying to create a GameMode in which I want players to be switched automatically from possessing the DefaultPawn to posses DefaultSpectatorPawn UPON the DEATH of DefaultPawn.
How would I do that?
Thanks in advance!
Hi vlad.servanescu11,
Please do not bump posts that have not gone unanswered for 4 or more days. This unnecessarily clutters the answerhub and makes it difficult to help anyone.
To answer your question: create a function in your player controller that unpossesses the dead pawn and possesses a pawn you use specifically for the spectator. This function should be called in your player pawn upon the Event Destroyed node. This node only activates when your actor is destroyed. Call the destroyed event, cast to your player controller, call the unpossess function that will possess your spectator pawn.
Thanks for the reply, but your suggestion is NOT my solution. I don’t have access to the PlayerController (the editor crashes everytime I try to create a custom one and use it). The game I am trying to mod is UT4.
Thanks again in advance !
In this case it would be best to post this question on the unreal tournament forums where it would get more exposure. You can find them /.
Why are you an admin?
Where do you think I’m coming from? Minecraft forums?
Thanks for nothing. Nice way of marking it [RESOLVED] even though it most certainly isn’t.
Hi vlad.serbanescu11,
Answerhub automatically resolves questions when a staff member posts a response on an answer they or another staff member posted. Having said that, the answerhub is specifically for Unreal Engine 4 related questions. In this case, the question you are asking is specific to the Unreal Tournament version of the editor, which has a different set of code and classes specific to Unreal Tournament. The reason I am pointing you back to those forums is because the best chance of getting the specific information you are looking for is to post on those forums where the majority of individuals that are developing for Unreal Tournament congregate.
More specifically, the steps I provided above are the steps that one would use in many situations. Because your question is case specific to Unreal Tournament, it will not be beneficial for me to give you the answer above because their code and classes are, as stated earlier, different from what is used in the general Unreal Engine 4. I will leave this as unresolved if that is what you want, however we do not guarantee an answer from staff members and you will probably get more detailed information on the forums as stated earlier.
Does GameMode create a spectator for each client on StartMatch()? Because at the beginning of the match, everyone is a spectator but then they possess the player pawn. So when I die do I need to call new and create a new spectator or does one already exist and I just need to possess it?