Hi everyone, it’s been days since I’m trying to do something I thought easy…but it’s a pain. I just want to switch from default level character to another and come back with a button press (better if with a trigger box). This blueprint is inside Player Controller, hope the screenshot is good enough.
My idea was: input from keyboard, if the condition “IsSwitchingCharacter“ is false then set it to true and then fi the condition “IsCharacterActive“ is true spawn a BP_Character. This spawn take the actor transform from Get Controlled Pawn. After the Spawn, tat has an IsValid node after, I destroy Actor taken from Get Controlled Pawn. After that I Possess the spawn character and then set the variables to get the branch working on the false line to go back to the original character.
The issue is: the first time I press the key the new character is spawned in the right position and I can controll it. If I press the key again, i see just for a fraction of a second the first character spawned in the right position, but instead of going on from this, the game just respawn the default level character from the player starter point.
I imagine there is a conflict between destroy actor and possess the default character, but I can’t understand what can fix it.
Thanks to anyone who can help me