Field of Battle: Helicopter - Solution for Helicopters and Flying Pawns

Hello, thanks for the purchase! This is a more in depth answer, let me know if this clarify how to possess and unpossess the helicopter, thank you!

For possess:
You can get an example of possess code from FoBHelicopter/Demo/Blueprints/BP_SelectVehicle, in this blueprint there’s a portion of code within a comment “Action Interact”:
Basically it cast to the master blueprint the result of a line trace, then ask if it can be possessed and then possess it.

For unpossess:
The helicopter ask the game mode to unpossess, and the game mode decides what to do, there’s an example on the demo room as well :slight_smile:

  1. Make sure you have a keybind (from project settings > input) for the “PossesRequest” in FoBHelicopter/Blueprints/BP_Master_Helicopter/Event Graph/
    Usually games have this set to E or F, this is the key the player will press to leave the helicopter.

  1. On your game mode you need to implement the Fob-HelicopterInterface, here’s how: Imgur: The magic of the Internet (don’t forget to compile after adding it).

  2. Right click and add the node “FOB-Helicopter on Leave Vehicle Request”, add implement your code from here. On FoBHelicopter/Demo/Core/BP_GameMode > “Leave Vehicle Requested” comment area you find an example of unpossessing the vehicle, creating a new pawn and possessing the new pawn.

unpossess.png