Character API


1 BP_Character_USG


1.1 Propeties


  • StateMutexSetting: Character state mutex config asset.

  • CurStates: Curruent character states (replicated).

  • MaxHealth: Max health value of this character.

  • MaxSpeed_Sprint: Max speed when this character sprinting.

  • MaxSpeed_Walk: Max speed when this character walking.

  • bDisableMovement: If true, the movement component will be disabled.

  • InitLinkAnimClass: Link anim class when character spawned.

  • ADS_Speed: ADS lerp speed.

  • ADS_FOV_FP: ADS fov for first person view.

  • ADS_FOV_TP: ADS fov for third person view.

  • DefaultItemList: Add these items when the character spawned.

  • UnarmedWeaponSlot: Switch weapon to this slot when holstering all weapons.


1.2 Functions


  • CanEnterState: Whether the character can enter target state.

  • IsInState: Whether the character is in target state now.

  • EnterState: Enter target state and return enter state result.

  • LeaveState: Leave target state.

  • GetCurrentHealth: Get current health value.

  • AddHealth: Change current health value.

  • GetMaxHealth: Return max health value.

  • SetInvincible: Set character invincible.

  • GetProfile: Return character profile.

  • GetGender: Return character gender.

  • GetTeamID: Return character team id, also used in ai character.

  • TakeDamage: Process damage event.

  • GetActiveCamera: Get active camera of character.

  • SwitchToFirstPersonView: Switch to first person view.

  • SwitchToThirdPersonView: Switch to third person view.

  • HolsterCurrentWeapon: Holster current in use weapon.

  • SwitchNextFireMode: Switch next shooting mode of current weapon.

  • StartAttack: Start weapon attack.

  • StopAttack: Stop weapon attack.


1.3 Events


  • OnStateChanged: Called when the character states changed.

  • OnServerTakeDamage: The event triggered when the character damaged.

  • OnHeathChanged: The event triggered when the character health changed.

  • OnPlayerDead: The event triggered when the character dead.

  • OnOwnerProfileChanged: The event triggered when the owner player profile changed.