I am currently working on a game where the main character has rocket arms, which he can shoot away to solve puzzles with them. As you shoot the rocket arm, you shall be able to control that arm, and the main character gets disabled. I got as far as spawning the rocket arm and possessing it, but have no idea how to unpossess it and come back to possess my main character.
Ill provide the blueprint being responsible to possess the rocket arm, but how do i get back?
I think you already know how to possess and unpossess, but are struggling on how to find your old pawn to control back again.
If this is your question, you simple add a Variable to your RocketArm of type Pawn, mark it as “Editable” and “Expose on Spawn”.
Now on the SpawnActor node you’ll have a new entry to plugin a Pawn, create a reference to “Self” and plug there.
When you’re done with the RocketArm, just unpossess and possess the Pawn you’ve saved on that variable.
Hey thanks for the fast answer. Yeah I maybe should have said that the problem for me is how to talk to my old character, as I already knew how to possess or unpossess, but luckliy you figured that one out.
Sorry, silly me…
I will try out your solution tomorrow, as I’m doing this in university and am now at home (ok, being at 11 p.m. in university would be a bit hard wouldn’t it?)
So thanks, I’ll tell if that worked, for anyone in the future running into the same problem, and if it doesn’t, I will of course too.