Command {{ currentPage ? currentPage.title : "" }}

Command: UPrimalcCommand

  • Used for interactive implementation, including query, verification, and implementation

  • It is recommended to overload BeginPlay in this function to convert OwnerActor to a building or monster and save it in a variable, with different interaction command blueprints set for the building and monster

Variable

Explain

OwnerActor

Parent Actor

CommandComponent

Interactive Command Component

InteractionDistance(Setting)

Interaction distance, the maximum interaction distance between the OwnerActor and the Player Actor, beyond which no interaction will occur

CommandID

Command ID, please set different IDs for different effects,

But opening the building backpack and opening the monster backpack can be set to the same (because there are no monster commands in the building command list)

UseColdDown

Using cooling, unlike UltimateControllerComponent ->CommandColdDownTime, it is a separate cooling system

  • Specific implementation,override

Override Function

Explain

QueryCommand(ACharacter* Character, APlayerController* PC, FCommandEntrie& OutCommandEntrie)

Query command, usually used for UI, returns FCommandEntry structure for wheel selector or default interaction

AllowCommand(ACharacter* Character, APlayerController* PC)

Allow the use of this interactive command, which will be called both before and after the interaction,

The function does not need to be implemented to determine the character's death and interaction distance. Please use data that the client can accept

ExecuteCommand(ACharacter* Character, APlayerController* PC)

Execute specific interactive commands, such as opening backpacks, closing furnaces, etc,

Although some validations have been added in AllowCommand, special validations used by servers can be added here (such as verifying data that clients do not need to receive)

{{{ content }}}