How to toggle new character action in same location?

Hey,
So I have spent most of today trying to get this working, I have tried lots of different variations and although I know why my BP is not working I can’t work out how to flow the logic correctly. My goal is to toggle between two character pawn classes, (BuildCharacter) and (FirstPerson).

At the moment the player spawns by default as (Buildcharacter), once tab is pressed (Firstperson) is spawned and possessed at the (Buildcharacter) transform (rotation/location) which is great. The problem is when I press tab again, the Buildcharacter doesn’t spawn on the (Firstperson) transform, instead the new spawn transform resets to a default location.

When I press tab, I want which ever pawn class is now spawned and possessed to spawn at the transform of the previous and vice versa per tab key input. Hopefully this makes sense, basically I want each spawn to be in the same location as the last. Also I would also like to kill(destroy) the previous spawned pawn.

As you can see in the blueprints above, I need to set the spawn transform for (SpawnActor First Person Chacter Rifle) back to the spawn transform of (Buildcharacter) somehow, however I cannot do so without causing a dependency cycle.

I’m not sure what your problem exactly is, but your blueprint seems fine, what happens if you conncet the ‘Is A’ pin with the branch conditions ?

Hello owenprescott.
Try to set the Transform from the current actor to a variable when you press Tab before the FlipFlop.
Then connect the Transform Variable to the SpawnTransform input’s.
So before you destroy the current actor store the transform. I think that the actor is destroyed before he gets the Transform.
Hope it helps :slight_smile: