Adventure Kit  4.16
Public Member Functions | Public Attributes | List of all members
AAdvKitCharacter Class Reference

Base character class of the Adventure Kit. More...

#include <AdvKitCharacter.h>

Inheritance diagram for AAdvKitCharacter:
AAdvKitGravityCharacter

Public Member Functions

 AAdvKitCharacter (const FObjectInitializer &ObjectInitializer)
 
UAdvKitCharacterActionGetActiveAction () const
 
virtual void NextItem ()
 
virtual void PreviousItem ()
 
FRotator GetAimOffsets () const
 
virtual FRotator GetAimOffsets_Implementation () const
 
FRotator GetAdjustedAimFor (class AAdvKitWeapon *Weapon, FVector FireLocation)
 
virtual FRotator GetAdjustedAimFor_Implementation (class AAdvKitWeapon *Weapon, FVector FireLocation)
 
FVector GetWeaponStartTraceLocation (class AAdvKitWeapon *Weapon=NULL)
 
virtual FVector GetWeaponStartTraceLocation_Implementation (class AAdvKitWeapon *Weapon=NULL)
 
virtual float GetMaximumTargetDistance ()
 
virtual TArray< AAdvKitTargetPoint * > GetAllAvailableTargets ()
 
virtual AAdvKitTargetPointGetBestTarget (const TArray< AAdvKitTargetPoint * > &AvailableTargets)
 
virtual void SetTarget (AAdvKitTargetPoint *NewTarget, bool bLock=false)
 
virtual const struct FAdvKitMovementPropertiesGetAdvMovementProperties () const
 
virtual class UAdvKitCharacterMovementComponentGetAdvMovementComponent () const
 
virtual void AddConditionalMovementInput (FVector WorldDirection, FVector LocalDirection, float ScaleValue=1.0f, bool bForce=false)
 
bool Use (class AAdvKitUsable *Usable=nullptr, class AAdvKitInventoryItem *WithItem=nullptr)
 
virtual bool Use_Implementation (class AAdvKitUsable *Usable=nullptr, class AAdvKitInventoryItem *WithItem=nullptr)
 
void ServerUse (class AAdvKitUsable *Useable=nullptr, class AAdvKitInventoryItem *WithItem=nullptr)
 
virtual void ServerUse_Implementation (class AAdvKitUsable *Useable=nullptr, class AAdvKitInventoryItem *WithItem=nullptr)
 
virtual bool StartAction (TSubclassOf< class UAdvKitCharacterAction > ActionClass, class UAdvKitCharacterAction_Arguments *Arguments=nullptr)
 
void StartActionServer (TSubclassOf< UAdvKitCharacterAction > ActionClass, UAdvKitCharacterAction_Arguments *Arguments=nullptr)
 
virtual void StartActionServer_Implementation (TSubclassOf< class UAdvKitCharacterAction > ActionClass, class UAdvKitCharacterAction_Arguments *Arguments=nullptr)
 
virtual bool StartTransitionActionTo (EAdvKitMovementMode NewMode, class UAdvKitCharacterAction_Arguments *Arguments=nullptr)
 
virtual void Reload ()
 
virtual void StartFire (uint8 FireMode=0)
 
virtual void StopFire ()
 
void Dodge ()
 
virtual void Dodge_Implementation ()
 
bool IsDodging () const
 
virtual bool IsDodging_Implementation () const
 
virtual void NextCamera ()
 
virtual void SetCameraMode (EAdvKitCameraType NewMode)
 
virtual EAdvKitCameraType GetCameraMode ()
 
bool LetGoOfZone ()
 
virtual bool LetGoOfZone_Implementation ()
 
bool JumpUpZone ()
 
virtual bool JumpUpZone_Implementation ()
 
FVector GetZoneAcceleration ()
 
virtual FVector GetZoneAcceleration_Implementation ()
 
float GetMaxZoneSpeed ()
 
virtual float GetMaxZoneSpeed_Implementation ()
 
bool TryToTransitionFromCurrentZone (const FVector &InWorldDirection, bool bIsJump=false)
 
virtual bool TryToTransitionFromCurrentZone_Implementation (const FVector &InWorldDirection, bool bIsJump=false)
 
bool TryToTransition (AAdvKitZone *ForZone, const FVector &ForWorldPosition, const FVector &InWorldDirection=FVector::ZeroVector, bool bIsJump=false)
 
virtual bool TryToTransition_Implementation (AAdvKitZone *ForZone, const FVector &ForWorldPosition, const FVector &InWorldDirection=FVector::ZeroVector, bool bIsJump=false)
 
UAdvKitTransitionComponentGetPossibleTransition (AAdvKitZone *ForZone, const FVector &ForWorldPosition, const FVector &InWorldDirection=FVector::ZeroVector, bool bIsJump=false)
 
virtual UAdvKitTransitionComponentGetPossibleTransition_Implementation (AAdvKitZone *ForZone, const FVector &ForWorldPosition, const FVector &InWorldDirection=FVector::ZeroVector, bool bIsJump=false)
 
bool CanTransitionFromCurrentZone (const FVector &InWorldDirection, bool bIsJump=false)
 
virtual bool CanTransitionFromCurrentZone_Implementation (const FVector &InWorldDirection, bool bIsJump=false)
 
bool CanTransition (AAdvKitZone *ForZone, const FVector &ForWorldPosition, const FVector &InWorldDirection=FVector::ZeroVector, bool bIsJump=false)
 
virtual bool CanTransition_Implementation (AAdvKitZone *ForZone, const FVector &ForWorldPosition, const FVector &InWorldDirection=FVector::ZeroVector, bool bIsJump=false)
 
FRotator GetDesiredRotationInZone (AAdvKitZone *Zone, const FVector &AtZoneLocation)
 
virtual FRotator GetDesiredRotationInZone_Implementation (AAdvKitZone *Zone, const FVector &AtZoneLocation)
 
FVector GetDesiredOffsetFromZone (AAdvKitZone *Zone, const FVector &AtZoneLocation)
 
virtual FVector GetDesiredOffsetFromZone_Implementation (AAdvKitZone *Zone, const FVector &AtZoneLocation)
 
FVector GetHalfExtentForZone (AAdvKitZone *Zone) const
 
virtual FVector GetHalfExtentForZone_Implementation (AAdvKitZone *Zone) const
 
void SetZone (AAdvKitZone *NewZone, bool bSnap=true, bool bClearPendingTransition=true)
 
virtual void SetZone_Implementation (class AAdvKitZone *NewZone, bool bSnap=true, bool bClearPendingTransition=true)
 
virtual void SetZoneServer (AAdvKitZone *NewZone, bool bSnap=true, bool bClearPendingTransition=true)
 
virtual void SetZoneServer_Implementation (AAdvKitZone *NewZone, bool bSnap=true, bool bClearPendingTransition=true)
 
bool CanEnterZone (AAdvKitZone *Zone)
 
virtual bool EnterZone (AAdvKitZone *Zone)
 
virtual AAdvKitZoneGetZone () const
 
virtual float GetDotToClosestLocation (AAdvKitZone *Zone, FVector LocalCharacterDirection)
 
virtual FVector GetDirectionToClosestLocation (AAdvKitZone *Zone) const
 
virtual float GetZoneDotToLocation (AAdvKitZone *Zone, FVector LocalZoneDirection)
 
bool CanTransitionTo (AAdvKitZone *Zone, UAdvKitTransitionComponent *NewTransition=nullptr)
 
virtual bool CanTransitionTo_Implementation (AAdvKitZone *Zone, UAdvKitTransitionComponent *NewTransition=nullptr)
 
bool TransitionTo (AAdvKitZone *NewZone, UAdvKitTransitionComponent *NewTransition=nullptr, bool bForce=false)
 
virtual bool TransitionTo_Implementation (AAdvKitZone *NewZone, UAdvKitTransitionComponent *NewTransition=nullptr, bool bForce=false)
 
void TransitionToServer (AAdvKitZone *NewZone, UAdvKitTransitionComponent *NewTransition=nullptr, bool bForce=false)
 
virtual void TransitionToServer_Implementation (AAdvKitZone *NewZone, UAdvKitTransitionComponent *NewTransition=nullptr, bool bForce=false)
 
virtual void SetZoneLocation (FVector NewLocation, bool bSnap=true)
 
virtual FVector GetZoneLocation ()
 
virtual bool UseClosestUseable ()
 
void SetMouseCursorEnabled (bool bEnabled=true) const
 
virtual bool IsFirstPerson () const
 
virtual bool IsThirdPerson () const
 
virtual bool IsShoulderCam () const
 
float BlockDamage (float Damage, struct FDamageEvent const &DamageEvent, class AController *EventInstigator, class AActor *DamageCauser)
 
float BlockAnyDamage (float DamageReceived, const class UDamageType *DamageType, class AController *InstigatedBy, AActor *DamageCauser)
 
virtual float BlockAnyDamage_Implementation (float DamageReceived, const class UDamageType *DamageType, class AController *InstigatedBy, AActor *DamageCauser)
 
float BlockRadialDamage (float DamageReceived, const class UDamageType *DamageType, FVector Origin, const struct FHitResult &HitInfo, class AController *InstigatedBy, AActor *DamageCauser)
 
virtual float BlockRadialDamage_Implementation (float DamageReceived, const class UDamageType *DamageType, FVector Origin, const struct FHitResult &HitInfo, class AController *InstigatedBy, AActor *DamageCauser)
 
float BlockPointDamage (float DamageReceived, const class UDamageType *DamageType, FVector HitLocation, FVector HitNormal, class UPrimitiveComponent *HitComponent, FName BoneName, FVector ShotFromDirection, class AController *InstigatedBy, AActor *DamageCauser)
 
virtual float BlockPointDamage_Implementation (float DamageReceived, const class UDamageType *DamageType, FVector HitLocation, FVector HitNormal, class UPrimitiveComponent *HitComponent, FName BoneName, FVector ShotFromDirection, class AController *InstigatedBy, AActor *DamageCauser)
 
bool IsAlive ()
 
virtual bool IsAlive_Implementation ()
 
void Died (class AController *Killer, struct FDamageEvent const &DamageEvent, FVector HitLocation)
 
virtual void Died_Implementation (class AController *Killer, struct FDamageEvent const &DamageEvent, FVector HitLocation)
 
UAnimMontage * GetMappedAnimMontage (UAnimMontage *AnimMontage)
 
virtual void OnRep_RepAnimMontage (FRepAdvKitAnimMontage OldRepAnimMontage)
 
void PlayAnimMontageServer (class UAnimMontage *AnimMontage, float InPlayRate=1.f, FName StartSectionName=NAME_None)
 
virtual void PlayAnimMontageServer_Implementation (class UAnimMontage *AnimMontage, float InPlayRate=1.f, FName StartSectionName=NAME_None)
 
void StopAnimMontageServer (class UAnimMontage *AnimMontage=NULL)
 
virtual void StopAnimMontageServer_Implementation (class UAnimMontage *AnimMontage=NULL)
 
void SetAnimRootMotionTranslationScaleBP (float InAnimRootMotionTranslationScale=1.f)
 
virtual void PostInitializeComponents () override
 
virtual void EndPlay (EEndPlayReason::Type Reason) override
 
virtual void Tick (float DeltaSeconds) override
 
virtual void NotifyActorEndOverlap (class AActor *OtherActor) override
 
virtual void NotifyActorBeginOverlap (class AActor *OtherActor) override
 
virtual void NotifyHit (class UPrimitiveComponent *MyComp, AActor *Other, class UPrimitiveComponent *OtherComp, bool bSelfMoved, FVector HitLocation, FVector HitNormal, FVector NormalImpulse, const FHitResult &Hit) override
 
virtual float TakeDamage (float Damage, struct FDamageEvent const &DamageEvent, class AController *EventInstigator, class AActor *DamageCauser) override
 
virtual void CalcCamera (float DeltaTime, struct FMinimalViewInfo &OutResult) override
 
virtual FRotator GetBaseAimRotation () const override
 
virtual bool ShouldTakeDamage (float Damage, FDamageEvent const &DamageEvent, AController *EventInstigator, AActor *DamageCauser) const override
 
virtual float PlayAnimMontage (class UAnimMontage *AnimMontage, float InPlayRate=1.f, FName StartSectionName=NAME_None) override
 
virtual void StopAnimMontage (class UAnimMontage *AnimMontage=NULL) override
 
virtual void Jump () override
 
virtual void Crouch (bool bClientSimulation=false)
 
virtual void FaceRotation (FRotator NewControlRotation, float DeltaSeconds) override
 
virtual bool CanJumpInternal_Implementation () const override
 
virtual void SetBase (UPrimitiveComponent *NewBase, const FName BoneName=NAME_None, bool bNotifyActor=true) override
 

Public Attributes

bool bEnterZonesFromHitAutomatically
 
bool bEnterZonesFromOverlapAutomatically
 
bool bIgnoreItemWhenEnteringZonesAutomatically
 
TArray< TEnumAsByte< ECollisionChannel > > CollisionChannelsToIgnoreInZones
 
FName HeadSocket
 
bool bInvincibleDuringDodge
 
class UAdvKitCameraController * CameraController
 
float Health
 
float MaxHealth
 
float PointAndClickTraceDistance
 
TArray< FAdvKitInventoryConfigDefaultInventory
 
TSubclassOf< class AAdvKitInventoryManagerInventoryManagerClass
 
class AAdvKitInventoryManagerInventoryManager
 
float MaxTargetDistance
 
AAdvKitTargetPointCurrentTarget
 
bool bLockTarget
 
bool bFaceLockedTarget
 
FPendingTransition PendingTransition
 
FTransitionCorrectionData TransitionCorrectionData
 
class UAdvKitTransitionComponentCurrentTransition_DEPRECATED
 
FAdvKitCharacterDied OnDied
 
TMap< UAnimMontage *, UAnimMontage * > MappedMontages
 
FRepAdvKitAnimMontage RepAnimMontage
 

Detailed Description

Base character class of the Adventure Kit.

This character can use zones, inventory items and execute character actions. It also provides functionality for several different camera styles and locking onto a target.

Constructor & Destructor Documentation

AAdvKitCharacter::AAdvKitCharacter ( const FObjectInitializer &  ObjectInitializer)

Constructor

Member Function Documentation

void AAdvKitCharacter::AddConditionalMovementInput ( FVector  WorldDirection,
FVector  LocalDirection,
float  ScaleValue = 1.0f,
bool  bForce = false 
)
virtual

Wraps AddMovementInput and transforms local direction in case of certain zone movement modes (Wall, Ledge and Ladder) instead of using world direction.

Parameters
WorldDirectionDirection in world space to apply input
LocalDirectionDirection of input in character space
ScaleValueScale to apply to input. This can be used for analog input, ie a value of 0.5 applies half the normal value, while -1.0 would reverse the direction.
bForceIf true always add the input, ignoring the result of IsMoveInputIgnored().
See also
AddMovementInput
float AAdvKitCharacter::BlockAnyDamage ( float  DamageReceived,
const class UDamageType *  DamageType,
class AController *  InstigatedBy,
AActor *  DamageCauser 
)

Hook method to block any incoming damage.

Parameters
DamageReceivedHow much damage to apply
DamageTypeType of damage
InstigatedByThe Controller responsible for the damage
DamageCauserThe Actor that directly caused the damage(e.g.the projectile that exploded, the rock that landed on you)
Returns
The amount of damage remaining after it was blocked
float AAdvKitCharacter::BlockDamage ( float  Damage,
struct FDamageEvent const &  DamageEvent,
class AController *  EventInstigator,
class AActor *  DamageCauser 
)

Hook method to block incoming damage.

Parameters
DamageHow much damage to apply
DamageEventData package that fully describes the damage received
EventInstigatorThe Controller responsible for the damage
DamageCauserThe Actor that directly caused the damage(e.g.the projectile that exploded, the rock that landed on you)
Returns
The amount of damage remaining after it was blocked
float AAdvKitCharacter::BlockPointDamage ( float  DamageReceived,
const class UDamageType *  DamageType,
FVector  HitLocation,
FVector  HitNormal,
class UPrimitiveComponent *  HitComponent,
FName  BoneName,
FVector  ShotFromDirection,
class AController *  InstigatedBy,
AActor *  DamageCauser 
)

Hook method to block any incoming point damage.

Parameters
DamageReceivedHow much damage to apply
DamageTypeType of damage
HitLocationWhere the damage hit the character
HitNormalNormal of the hit on the character
HitComponentWhich component was hit
BoneNameWhich bone in the component was hit
ShotFromDirectionWhere the damage came from
InstigatedByThe Controller responsible for the damage
DamageCauserThe Actor that directly caused the damage(e.g.the projectile that exploded, the rock that landed on you)
Returns
The amount of damage remaining after it was blocked
float AAdvKitCharacter::BlockRadialDamage ( float  DamageReceived,
const class UDamageType *  DamageType,
FVector  Origin,
const struct FHitResult &  HitInfo,
class AController *  InstigatedBy,
AActor *  DamageCauser 
)

Hook method to block any incoming radial damage.

Parameters
DamageReceivedHow much damage to apply
DamageTypeType of damage
OriginOrigin of the radial damage
HitInfoWhere the damage actually hit the character
InstigatedByThe Controller responsible for the damage
DamageCauserThe Actor that directly caused the damage(e.g.the projectile that exploded, the rock that landed on you)
Returns
The amount of damage remaining after it was blocked
bool AAdvKitCharacter::CanEnterZone ( AAdvKitZone Zone)

Check if character can enter a zone

Parameters
ZoneZone to enter
Returns
True if zone can be entered
bool AAdvKitCharacter::CanTransition ( AAdvKitZone ForZone,
const FVector &  ForWorldPosition,
const FVector &  InWorldDirection = FVector::ZeroVector,
bool  bIsJump = false 
)

Checks if the character can use a transition in a given zone

Parameters
ForZoneZone to start transition in
ForWorldPositionWhere to start the transition
InWorldDirectionThe direction the player wants to transition in
bIsJumpTrue if the character attempts to jump during the transition
Returns
True if the character can transition with the provided arguments
bool AAdvKitCharacter::CanTransitionFromCurrentZone ( const FVector &  InWorldDirection,
bool  bIsJump = false 
)

Checks if the character can use a transition in the zone it is currently in

Parameters
InWorldDirectionThe direction the player wants to transition in
bIsJumpTrue if the character attempts to jump during the transition
Returns
True if the character can transition with the provided arguments
bool AAdvKitCharacter::CanTransitionTo ( AAdvKitZone Zone,
UAdvKitTransitionComponent NewTransition = nullptr 
)

Check if character can transition to a given zone

Parameters
ZoneZone to transition to
Returns
True if zone can be transitioned to
void AAdvKitCharacter::Died ( class AController *  Killer,
struct FDamageEvent const &  DamageEvent,
FVector  HitLocation 
)

Called when the character died

Parameters
KillerWho killed the character
DamageEventThe damage event responsible for the kill
HitLocationWhere the damage that killed came from
void AAdvKitCharacter::Dodge ( )

Make the character dodge

bool AAdvKitCharacter::EnterZone ( AAdvKitZone Zone)
virtual

Attempts to enter a given zone

Parameters
ZoneZone to enter
Returns
True if zone was entered
UAdvKitCharacterAction * AAdvKitCharacter::GetActiveAction ( ) const

Get the action that the character is currently executing.

Returns
Action that is currently executed
FRotator AAdvKitCharacter::GetAdjustedAimFor ( class AAdvKitWeapon Weapon,
FVector  FireLocation 
)

Get the rotation for a weapon to fire at. X-Axis of the rotator is forward for the shot

Parameters
WeaponWeapon that wants to fire
FireLocationLocation from which the weapon wants to fire
Returns
Rotation of the aim
class UAdvKitCharacterMovementComponent * AAdvKitCharacter::GetAdvMovementComponent ( ) const
virtual

Get the character's adv kit movement component.

Returns
The character's adv kit movement component.
const struct FAdvKitMovementProperties * AAdvKitCharacter::GetAdvMovementProperties ( ) const
virtual

Get the character's adv kit movement properties

Returns
The character's adventure kit movement properties
FRotator AAdvKitCharacter::GetAimOffsets ( ) const

Get Aim direction offset from character rotation

Returns
Aim offset rotation
TArray< AAdvKitTargetPoint * > AAdvKitCharacter::GetAllAvailableTargets ( )
virtual

Gets all targets the player can reach and lock on to.

Returns
Reachable targets
AAdvKitTargetPoint * AAdvKitCharacter::GetBestTarget ( const TArray< AAdvKitTargetPoint * > &  AvailableTargets)
virtual

Filter a list of targets and get the best (e.g. closest) one

Parameters
AvailableTargetsList to filter for target
Returns
Chosen target
EAdvKitCameraType AAdvKitCharacter::GetCameraMode ( )
virtual

Get the current camera mode

Returns
Current camera mode
FVector AAdvKitCharacter::GetDesiredOffsetFromZone ( AAdvKitZone Zone,
const FVector &  AtZoneLocation 
)

Query how far the character should be away from the location inside the zone

Parameters
ZoneZone to get the desired offset from
AtZoneLocationLocation inside the current zone
Returns
Desired offset from the location inside the zone
FRotator AAdvKitCharacter::GetDesiredRotationInZone ( AAdvKitZone Zone,
const FVector &  AtZoneLocation 
)

Query what rotation the character should have at a specified location inside the current zone.

Parameters
ZoneZone to get the desired rotation
AtZoneLocationLocation inside the current zone
Returns
Desired rotation of the character
FVector AAdvKitCharacter::GetHalfExtentForZone ( AAdvKitZone Zone) const

Query how "big" the character for a specific movement mode in local space.

Parameters
ZoneZone to get extent for
Returns
Half extent of the character e.g (Radius, Radius, Capsule Half Height)
float AAdvKitCharacter::GetMaximumTargetDistance ( )
virtual

Get the maximum distance at which targets should be considered for the character

Returns
Distance at which targets are considered.
float AAdvKitCharacter::GetMaxZoneSpeed ( )

Get the maximum speed for the current zone

Returns
Maximum speed
UAdvKitTransitionComponent* AAdvKitCharacter::GetPossibleTransition ( AAdvKitZone ForZone,
const FVector &  ForWorldPosition,
const FVector &  InWorldDirection = FVector::ZeroVector,
bool  bIsJump = false 
)

Queries all possible transitions a zone has for the character

Parameters
ForZoneZone to get transitions from
ForWorldPositionWhere to start the transition
InWorldDirectionThe direction the player wants to transition in
bIsJumpTrue if the character attempts to jump during the transition
Returns
List of possible transitions
FVector AAdvKitCharacter::GetWeaponStartTraceLocation ( class AAdvKitWeapon Weapon = NULL)

Get the starting location for tracing the target, e.g. the player's eyes

Parameters
WeaponWeapon that wants to trace
Returns
Starting location for the trace
class AAdvKitZone * AAdvKitCharacter::GetZone ( ) const
virtual

Gets the zone the character is currently in.

Returns
Current zone
FVector AAdvKitCharacter::GetZoneAcceleration ( )

Get the acceleration for the current zone

Returns
Current acceleration
FVector AAdvKitCharacter::GetZoneLocation ( )
virtual

Get the current zone location of the character

Returns
Current zone location
bool AAdvKitCharacter::IsAlive ( )

Check if the character is still alive

Returns
True if still alive
bool AAdvKitCharacter::IsDodging ( ) const

Check if the character is dodging

Returns
True if dodging
bool AAdvKitCharacter::IsFirstPerson ( ) const
virtual

Is the character currently in first person mode?

Returns
True if in first person mode
bool AAdvKitCharacter::IsShoulderCam ( ) const
virtual

Is the character currently in shoulder camera mode?

Returns
True if in shoulder camera mode
bool AAdvKitCharacter::IsThirdPerson ( ) const
virtual

Is the character currently in third person mode?

Returns
True if in third person mode
bool AAdvKitCharacter::JumpUpZone ( )

Tries to transition upwards on a zone

Returns
True if a transition happened
bool AAdvKitCharacter::LetGoOfZone ( )

Tries to let go of a zone (transition downwards or leaving a wall)

Returns
True if a transition happened
void AAdvKitCharacter::NextCamera ( )
virtual

If the character has multiple cameras, switch to the next one

void AAdvKitCharacter::NextItem ( )
virtual

Equip the next item in the character's inventory

void AAdvKitCharacter::OnRep_RepAnimMontage ( FRepAdvKitAnimMontage  OldRepAnimMontage)
virtual

Callback when anim montage was replicated.

void AAdvKitCharacter::PlayAnimMontageServer ( class UAnimMontage *  AnimMontage,
float  InPlayRate = 1.f,
FName  StartSectionName = NAME_None 
)

Server callback to play an AnimMontage.

Parameters
AnimMontageMontage to play
InPlayRateSpeed at which to play montage
StartSectionNameWhere to start playing
void AAdvKitCharacter::PreviousItem ( )
virtual

Equip the previous item in the character's inventory

void AAdvKitCharacter::Reload ( )
virtual

Reloads the character's current weapon

void AAdvKitCharacter::ServerUse ( class AAdvKitUsable Useable = nullptr,
class AAdvKitInventoryItem WithItem = nullptr 
)

Server callback to use a usable with a given item (e.g. a lock with a key)

Parameters
UseableUsable to use with optional item
WithItemOptional item to use usable with
void AAdvKitCharacter::SetAnimRootMotionTranslationScaleBP ( float  InAnimRootMotionTranslationScale = 1.f)

Sets scale to apply to root motion translation on this Character

void AAdvKitCharacter::SetCameraMode ( EAdvKitCameraType  NewMode)
virtual

Set a specific camera mode.

Parameters
Cameramode to set
void AAdvKitCharacter::SetMouseCursorEnabled ( bool  bEnabled = true) const

Enable the mouse cursor for point and click

Parameters
bEnabledTrue to enable, false to disable
void AAdvKitCharacter::SetTarget ( AAdvKitTargetPoint NewTarget,
bool  bLock = false 
)
virtual

Set a new target for the character

Parameters
NewTargetThe target to set
bLockTrue to lock onto the target
void AAdvKitCharacter::SetZone ( AAdvKitZone NewZone,
bool  bSnap = true,
bool  bClearPendingTransition = true 
)

Set a new zone for the character

Parameters
NewZoneThe new zone to set
bSnapSnap character to the new zone
void AAdvKitCharacter::SetZoneLocation ( FVector  NewLocation,
bool  bSnap = true 
)
virtual

Set a new zone and zone location for the character

Parameters
NewLocationNew zone location to set
bSnapSnap character to the new zone
virtual void AAdvKitCharacter::SetZoneServer ( AAdvKitZone NewZone,
bool  bSnap = true,
bool  bClearPendingTransition = true 
)
virtual

Server callback to a new zone for the character

Parameters
NewZoneThe new zone to set
bSnapSnap character to the new zone
bool AAdvKitCharacter::StartAction ( TSubclassOf< class UAdvKitCharacterAction ActionClass,
class UAdvKitCharacterAction_Arguments Arguments = nullptr 
)
virtual

Tries to start a new character action on this character

Parameters
ActionClassClass of the action to start
ArgumentsArguments to supply when starting the action.
Returns
True if the given action was started
void AAdvKitCharacter::StartFire ( uint8  FireMode = 0)
virtual

Starts firing with the currently equipped weapon

Parameters
FireModeIndex of fire mode to start firing
bool AAdvKitCharacter::StartTransitionActionTo ( EAdvKitMovementMode  NewMode,
class UAdvKitCharacterAction_Arguments Arguments = nullptr 
)
virtual

Tries to start a transition action to a given movement mode

Parameters
NewModeTarget movement mode of the transition
ArgumentsArguments to supply when starting the action.
Returns
True if a transition was started
void AAdvKitCharacter::StopFire ( )
virtual

Stops firing the currently equipped weapon

bool AAdvKitCharacter::TryToTransition ( AAdvKitZone ForZone,
const FVector &  ForWorldPosition,
const FVector &  InWorldDirection = FVector::ZeroVector,
bool  bIsJump = false 
)

Attempts to do a transition inside a zone to a given direction

Parameters
ForZoneZone to start transition in
ForWorldPositionWhere to start the transition
InWorldDirectionThe direction the player wants to transition in
bIsJumpTrue if the character attempts to jump during the transition
Returns
True if a transition happened
bool AAdvKitCharacter::TryToTransitionFromCurrentZone ( const FVector &  InWorldDirection,
bool  bIsJump = false 
)

Attempts to do a transition from the zone the character is currently in

Parameters
InWorldDirectionThe direction the player wants to transition in
bIsJumpTrue if the character attempts to jump during the transition
Returns
True if a transition happened
bool AAdvKitCharacter::Use ( class AAdvKitUsable Usable = nullptr,
class AAdvKitInventoryItem WithItem = nullptr 
)

Use a usable with a given item (e.g. a lock with a key)

Parameters
UsableUsable to use with optional item
WithItemOptional item to use usable with
bool AAdvKitCharacter::UseClosestUseable ( )
virtual

Use the usable closest to the character

Member Data Documentation

bool AAdvKitCharacter::bEnterZonesFromHitAutomatically

Whether or not to automatically enter a zone when the character hits it

bool AAdvKitCharacter::bEnterZonesFromOverlapAutomatically

Whether or not to automatically enter a zone when the character overlaps it

bool AAdvKitCharacter::bFaceLockedTarget

Whether or not to face a target that has been locked

bool AAdvKitCharacter::bIgnoreItemWhenEnteringZonesAutomatically

Whether or not to automatically enter a zone when the character overlaps it

bool AAdvKitCharacter::bInvincibleDuringDodge

If true the character takes no damage if it is dodging

bool AAdvKitCharacter::bLockTarget

Whether the target is locked in

TArray<TEnumAsByte<ECollisionChannel> > AAdvKitCharacter::CollisionChannelsToIgnoreInZones

List of collision channels to ignore while moving inside a zone

AAdvKitTargetPoint* AAdvKitCharacter::CurrentTarget

Currently targeted component

TArray< FAdvKitInventoryConfig > AAdvKitCharacter::DefaultInventory

Configuration of items to create for the character by default

FName AAdvKitCharacter::HeadSocket

Name of the socket which represents the character's head. Used for first person camera and weapon targeting.

float AAdvKitCharacter::Health

Health points of the character

class AAdvKitInventoryManager* AAdvKitCharacter::InventoryManager

Inventory manager this character uses

TSubclassOf<class AAdvKitInventoryManager> AAdvKitCharacter::InventoryManagerClass

Class of the inventory manager for this character

TMap<UAnimMontage*, UAnimMontage*> AAdvKitCharacter::MappedMontages

Maps Montages to redirect montages. If montages are played a redirected montage will be played instead.

float AAdvKitCharacter::MaxHealth

Max health of the character

float AAdvKitCharacter::MaxTargetDistance

How far away targets can be for auto targeting

FAdvKitCharacterDied AAdvKitCharacter::OnDied

Delegate that is called when the character dies

float AAdvKitCharacter::PointAndClickTraceDistance

How far away items and switches can be from the camera to be found with clicking

FRepAdvKitAnimMontage AAdvKitCharacter::RepAnimMontage

Property that contains all required values for replicated the played AnimMontage


The documentation for this class was generated from the following files: