How to Switch current controlled pawn.

such as the content example bp ufo control when the player trigger ,the current controlled pawn will switch to ufo. how to implement it by c++.