The June sale is here! Save up to 70% on select products now through June 20.

Pawn Swapper

Sean Dachtler - Blueprints - May 18, 2024
1
5 out of 5 stars(1 rating)
  • 100%
  • 0%
  • 0%
  • 0%
  • 0%

A component that lets you easily replace your active pawn with another, and even save and load some values to/from them as they get swapped out.

On Sale$4.99
$3.49Sign in to Buy
  • Supported Platforms
  • Supported Engine Versions
    4.24 - 4.27, 5.0 - 5.4
  • Download Type
    Asset Pack
    This product contains an assortment of Unreal Engine assets which can be imported into a pre-existing project of your choice.

Demo Video

Tutorial Video


Hello and welcome! The core of this system is the Pawn_Swapper_BP component, meant to be added into player controllers. Then with a single message node, you can tell the player controller to replace the current pawn with any other one on demand, or from a list of various pawns you can make in advance.

If you set up the info for a list of possible pawns in advance, then you can also have it manage custom info being saved and sent to pawns when destroyed or spawned, such as possibly saving health when a pawn is removed, and sending it the previous copy of itself saved health value when it’s next spawned, as well as the values from the previous pawn it was swapped from. While if using multiple pawns in a game you swap between I’d recommend putting most such systems for UI, inventory, etc… in the player controller itself, this can help with handling stuff on the actor side when needed. Note you’ll need to manually plug in the variables you want to save, or load, so some blueprint work is required to hook this up properly.

This package also includes a blueprint interface that allows for a standardized method of sending pawn swap requests from other actors, so you can easily set up level events or other triggers to force a change. For the full details on all the options included and exactly how to use this product, read on.

Technical Details

Features:

  •  A component you can add to a player controller to handle swapping out one pawn for another with a single message node.
  • A system for saving variables and info from a despawned pawn, and updating newly spawned ones with their previously submitted values, allowing for actor side systems like health, inventory, etc… to be more easily kept consistent across pawn changes.

Number of Blueprints: 1 blueprint, 1 enum, 2 structs, 1 data table.

Input: Example uses keyboard and mouse.

Network Replicated: Yes

Supported Development Platforms:

Windows: Yes

Mac: No

Documentation: https://docs.google.com/document/d/1PIRPkUfCkG8mmLXoAIye6dLF6TonFOAz_KN5HqtmGTs/edit?usp=sharing

Important/Additional Notes: Remember that not all pawns/player controllers support having different controllers/pawns. So if you are using some premade game templates and the pawn requires a specific controller to work, or the controller wants a specific pawn to work, that will still throw errors if you swap pawns using my product or not.