Alexander Sychov: 所有产品五折优惠

Pawn Swapper

Sean Dachtler - 蓝图 - 2024/05/18
1
5颗星(总分5颗星)(1个评分)
  • 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.

  • 支持的平台
  • 支持的引擎版本
    4.24 - 4.27, 5.0 - 5.4
  • 下载类型
    资源包
    此产品包含各种虚幻引擎资源,可以选择性导入现有的项目。

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.

技术细节

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.