G1R AngelScript
Scripting reference for the Gothic 1 Remake
Loading...
Searching...
No Matches
UCharacterPerceptionComponent Class Reference

Public Member Functions

Functions
TArray< AGothicCharacter > GetHostileCharactersPerceivingMe (float32 Radius=0.000000) const
const FPerceptionShortTermMemory & GetMemory () const
int ApplyAwarenessOfAllCharactersSensedBy (const AGothicCharacter SensingCharacterToSync, float32 WithinDistance=- 1.000000)
 Applies the awareness the SensingCharacter has of other characters to the own awareness.
bool CanGroundedTargetBePotentiallyReached (const AGothicCharacter Target, float32 ReachRangeXY, float32 ReachRangeZ) const
 Fast reachability check using cached perception path.
bool CanHear (const AGothicCharacter OtherCharacter, float32 MinTimeSeconds=0.000000, float32 AwarenessThreshold=0.000000) const
 Returns true, if this character can hear the other character right now.
bool CanSee (const AGothicCharacter OtherCharacter, float32 MinTimeSeconds=0.000000, float32 AwarenessThreshold=0.000000) const
 Returns true, if this character can see the other character right now.
bool CanSense (const AGothicCharacter OtherCharacter, float32 MinTimeSeconds=0.000000) const
 Returns true, if this character can (in some way) perceive the other character right now.
bool CanSmell (const AGothicCharacter OtherCharacter, float32 MinTimeSeconds=0.000000, float32 AwarenessThreshold=0.000000) const
 Returns true, if this character can smell the other character right now.
TArray< AGothicCharacter > GetAllPotentiallyReachableCharactersInRadiusSortedByDistance (float32 Radius) const
 Returns all characters that might be reachable by pathfollowing, sorted closest to furthest (pathlength).
TArray< AGothicCharacter > GetAllSensedCharacters (FGameplayTagContainer IncludeCharactersWith, FGameplayTagContainer ExcludeCharactersWith, EPerceptionSense ViaSense=EPerceptionSense ::None, bool bRequiresFullAwareness=false, float32 MinAwareness=0.000000) const
 Returns all characters that are perceived in some way right now.
TArray< AGothicCharacter > GetAllSensedCharactersMatchingPerceptionHandler (FPerceptionHandlerHandle Handler) const
 Returns all sensed Characters currently perceived by the given perception handler.
TArray< AGothicCharacter > GetAllSensedCharactersWithHostility (ERelationshipHostility Hostility, FGameplayTagContainer IncludeCharactersWith, FGameplayTagContainer ExcludeCharactersWith, EPerceptionSense ViaSense=EPerceptionSense ::None, bool bRequiresFullAwareness=false, float32 MinAwareness=0.000000) const
 Returns all characters that are perceived in some way right now and have the given hostility.
TArray< AGothicCharacter > GetAllSensedCharactersWithRelationship (ERelationship Relationship, FGameplayTagContainer IncludeCharactersWith, FGameplayTagContainer ExcludeCharactersWith, EPerceptionSense ViaSense=EPerceptionSense ::None, bool bRequiresFullAwareness=false, float32 MinAwareness=0.000000) const
 Returns all characters that are perceived in some way right now and have the given relationship.
TArray< AItemVisualWorld > GetAllSensedItemsMatchingPerceptionHandler (FPerceptionHandlerHandle Handler) const
 Returns all sensed Items currently perceived by the given perception handler.
float32 GetAwarenessToCharacter (const AGothicCharacter Target, EPerceptionSense ViaSense) const
const FPerceptionHearingSettings & GetHearingCapabilities () const
 Returns how good this character can hear.
FPerceptionHandler & AddPerceptionHandler ()
AGothicCharacter GetOwnerCharacter () const
 Access to the character that owns this component. (Usually Component's Owner-Actor).
FLinearColor GetReceivedLogicalLight () const
 Returns how much LogicalLight was has received.
float32 GetReceivedLogicalLightIntensity () const
 Returns how much LogicalLight was has received.
TArray< AGothicCharacter > GetSensedDeadCharacters (EPerceptionSense ViaSense=EPerceptionSense ::None) const
 Returns all dead (not defeated) characters that are perceived in some way right now.
TArray< AGothicCharacter > GetSensedLivingCharacters (EPerceptionSense ViaSense=EPerceptionSense ::None, bool bIncludeDefeated=false) const
 Returns all non dead characters that are perceived in some way right now.
const FPerceptionSightSettings & GetSightCapabilities () const
 Returns how good this character can hear.
float32 GetSumLevelOfSensedCharactersMatchingPerceptionHandler (FPerceptionHandlerHandle Handler) const
 Returns the combined level of all sensed Characters filterd by the conditions of a perception handler.
bool IsCharacterPotentiallyReachable (const AGothicCharacter OtherCharacter) const
 Fast lookup if there is a cached perception-path to the given character. Ignores navlink conditions and area costs.
void ReportPerceptionEvent (FGameplayTag EventTag, FVector AtLocation, AGothicCharacter SensedCharacter, AActor TargetActor=nullptr, AActor InstigatorActor=nullptr, AActor AffectedActor=nullptr)
 Stores the given perception in this characters memory and broadcasts it to everybody sensing us.
void SetAwarenessToCharacter (const AGothicCharacter Target, EPerceptionSense ViaSense, float32 Awareness)
int ShareAwarenessWithAllSensedCharacters (const AGothicCharacter SensedCharacterToSync, float32 WithinDistance=- 1.000000)
 Applies our awareness of the given character to all other characters that we can sense.
Public Member Functions inherited from UPerceptionComponent
void ReportAreaEventAt (FGameplayTag EventTag, FVector AtLocation, float32 Radius, AActor SensedActor, AActor TargetActor=nullptr, AActor InstigatorActor=nullptr, AActor AffectedActor=nullptr)
 Broadcasts the given event at the given location.
bool CanBeSeenByAnyPlayer (float32 MinTimeSeconds=0.000000) const
 Returns true if any player can see this character. Optionally, specify how long the player must see the character already.
TArray< AGothicCharacter > GetCharactersPerceivingMe (EPerceptionSense ViaSense, FGameplayTagContainer IncludeCharactersWith, FGameplayTagContainer ExcludeCharactersWith) const
 Returns all characters that are perceiving me in some way right now.
bool IsInHearingRangeOfAnyPlayer (EPerceptionNoiseLoudness Loudness) const
 Returns true if any player would hear this character, if it made a noise in the given loudness.
void BroadcastAreaEvent (FGameplayTag EventTag, float32 Radius, AActor SensedActor, AActor TargetActor=nullptr, AActor InstigatorActor=nullptr, AActor AffectedActor=nullptr)
 Broadcasts the given event at my location.
Public Member Functions inherited from UActorComponent
void Tick (float32 DeltaSeconds)
 Event called every frame if tick is enabled.
EComponentCreationMethod GetComponentCreationMethod () const
void SetbIsEditorOnly (bool Value)
void EndPlay (EEndPlayReason EndPlayReason)
 Blueprint implementable event for when the component ends play, generally via destruction or its Actor's EndPlay.
void BeginPlay ()
 Blueprint implementable event for when the component is beginning play, called before its owning actor's BeginPlay or when the component is dynamically created if the Actor has already BegunPlay.
void MarkRenderStateDirty ()
bool HasBegunPlay () const
void SetbTickInEditor (bool Value)
bool IsVisualizationComponent () const
void SetIsVisualizationComponent (bool Value)
void AsyncPhysicsTick (float32 DeltaSeconds, float32 SimSeconds)
 Event called every async physics tick if bAsyncPhysicsTickEnabled is true.
bool GetbReplicateUsingRegisteredSubObjectList () const
 When true the replication system will only replicate the registered subobjects list When false the replication system will instead call the virtual ReplicateSubObjects() function where the subobjects need to be manually replicated.
void SetbReplicateUsingRegisteredSubObjectList (bool Value)
 When true the replication system will only replicate the registered subobjects list When false the replication system will instead call the virtual ReplicateSubObjects() function where the subobjects need to be manually replicated.
bool GetbReplicates () const
 Is this component currently replicating? Should the network code consider it for replication? Owning Actor must be replicating first!
void SetbReplicates (bool Value)
 Is this component currently replicating? Should the network code consider it for replication? Owning Actor must be replicating first!
bool GetbAutoActivate () const
 Whether the component is activated at creation or must be explicitly activated.
void SetbAutoActivate (bool Value)
 Whether the component is activated at creation or must be explicitly activated.
void SetbEditableWhenInherited (bool Value)
 True if this component can be modified when it was inherited from a parent actor class.
void SetbCanEverAffectNavigation (bool Value)
 Whether this component can potentially influence navigation.
bool GetbIsEditorOnly () const
 If true, the component will be excluded from non-editor builds.
bool IsBeingDestroyed () const
 Returns whether the component is in the process of being destroyed.
void SetIsReplicated (bool ShouldReplicate)
 Enable or disable replication. This is the equivalent of RemoteRole for actors (only a bool is required for components).
void DestroyComponent (UObject Object)
 Unregister and mark for pending kill a component. This may not be used to destroy a component that is owned by an actor unless the owning actor is calling the function.
bool ComponentHasTag (FName Tag) const
 See if this component contains the supplied tag.
AActor GetOwner () const
 Follow the Outer chain to get the AActor that 'Owns' this component.
void SetAutoActivate (bool bNewAutoActivate)
 Sets whether the component should be auto activate or not. Only safe during construction scripts.
bool IsActive () const
 Returns whether the component is active or not.
void ToggleActive ()
 Toggles the active state of the component.
void SetActive (bool bNewActive, bool bReset=false)
 Sets whether the component is active or not.
void Activate (bool bReset=false)
 Activates the SceneComponent, should be overridden by native child classes.
void Deactivate ()
 Deactivates the SceneComponent.
float32 GetComponentTickInterval () const
 Returns the tick interval for this component's primary tick function, which is the frequency in seconds at which it will be executed.
void AddTickPrerequisiteActor (AActor PrerequisiteActor)
 Make this component tick after PrerequisiteActor.
void AddTickPrerequisiteComponent (UActorComponent PrerequisiteComponent)
 Make this component tick after PrerequisiteComponent.
void RemoveTickPrerequisiteComponent (UActorComponent PrerequisiteComponent)
 Remove tick dependency on PrerequisiteComponent.
void SetTickableWhenPaused (bool bTickableWhenPaused)
 Sets whether this component can tick when paused.
bool IsComponentTickEnabled () const
 Returns whether this component has tick enabled or not.
void SetTickGroup (ETickingGroup NewTickGroup)
 Changes the ticking group for this component.
void RemoveTickPrerequisiteActor (AActor PrerequisiteActor)
 Remove tick dependency on PrerequisiteActor.
void SetComponentTickIntervalAndCooldown (float32 TickInterval)
 Sets the tick interval for this component's primary tick function. Does not enable the tick interval. Takes effect imediately.
void SetComponentTickInterval (float32 TickInterval)
 Sets the tick interval for this component's primary tick function. Does not enable the tick interval. Takes effect on next tick.
void SetComponentTickEnabled (bool bEnabled)
 Set this component's tick functions to be enabled or disabled. Only has an effect if the function is registered.
Public Member Functions inherited from UObject
bool MarkPackageDirty () const
void RemoveFromRoot ()
bool GetIsRooted () const
bool IsTransient () const
bool Modify (bool bAlwaysMarkDirty=true)
void SetTransactional (bool bTransactional)
bool IsSupportedForNetworking () const
UClass GetClass () const
UObject GetOuter () const
UObject GetTypedOuter (TSubclassOf< UObject > Target) const
 Traverses the outer chain searching for the next object of a certain type.
UPackage GetOutermost () const
UPackage GetPackage () const
void AddToRoot ()
UWorld GetWorld () const
FName GetName () const
FString GetFullName (const UObject StopOuter=nullptr) const
FString GetPathName (const UObject StopOuter=nullptr) const
bool IsA (const UClass Class) const
 Returns true if this object is of the specified type, or a child of that type.
void SaveConfig ()
void LoadConfig ()
void ReloadConfig ()
void CopyScriptPropertiesFrom (const UObject OtherObject)
void opCast (?&Address) const
FString ToString () const

Static Public Member Functions

Static Functions
static UCharacterPerceptionComponent Get (const AActor Actor, FName WithName=NAME_None)
static UCharacterPerceptionComponent GetOrCreate (AActor Actor, FName WithName=NAME_None)
static UCharacterPerceptionComponent Create (AActor Actor, FName WithName=NAME_None)
static UClass StaticClass ()
Static Public Member Functions inherited from UPerceptionComponent
static UPerceptionComponent Get (const AActor Actor, FName WithName=NAME_None)
static UPerceptionComponent GetOrCreate (AActor Actor, FName WithName=NAME_None)
static UPerceptionComponent Create (AActor Actor, FName WithName=NAME_None)
static UClass StaticClass ()
Static Public Member Functions inherited from UActorComponent
static UActorComponent Get (const AActor Actor, FName WithName=NAME_None)
static UActorComponent GetOrCreate (AActor Actor, FName WithName=NAME_None)
static UActorComponent Create (AActor Actor, FName WithName=NAME_None)
static UClass StaticClass ()
Static Public Member Functions inherited from UObject
static UClass StaticClass ()

Public Attributes

Variables
const FPerceptionHearingSettings HearingCapabilities
 Returns how good this character can hear.
const AGothicCharacter OwnerCharacter
 Access to the character that owns this component. (Usually Component's Owner-Actor).
const FLinearColor ReceivedLogicalLight
 Returns how much LogicalLight was has received.
const float32 ReceivedLogicalLightIntensity
 Returns how much LogicalLight was has received.
const FPerceptionSightSettings SightCapabilities
 Returns how good this character can hear.
const FPerceptionShortTermMemory Memory
Public Attributes inherited from UPerceptionComponent
float32 CustomUpdateRate
Public Attributes inherited from UActorComponent
bool bAutoActivate
 Whether the component is activated at creation or must be explicitly activated.
TArray< TObjectPtr< UAssetUserData > > AssetUserData
 Array of user data stored with the component.
TArray< TObjectPtr< UAssetUserData > > AssetUserDataEditorOnly
 Array of user data stored with the component.
bool bReplicates
 Is this component currently replicating? Should the network code consider it for replication? Owning Actor must be replicating first!
FActorComponentTickFunction PrimaryComponentTick
 Main tick function for the Component.
bool bIsEditorOnly
 If true, the component will be excluded from non-editor builds.
bool bReplicateUsingRegisteredSubObjectList
 When true the replication system will only replicate the registered subobjects list When false the replication system will instead call the virtual ReplicateSubObjects() function where the subobjects need to be manually replicated.
TArray< FName > ComponentTags
 Array of tags that can be used for grouping and categorizing. Can also be accessed from scripting.
const EComponentCreationMethod ComponentCreationMethod
const AActor Owner
 Follow the Outer chain to get the AActor that 'Owns' this component.
FActorComponentDeactivateSignature OnComponentDeactivated
 Called when the component has been deactivated.
FActorComponentActivatedSignature OnComponentActivated
 Called when the component has been activated, with parameter indicating if it was from a reset.
float32 ComponentTickInterval
 Returns the tick interval for this component's primary tick function, which is the frequency in seconds at which it will be executed.
Public Attributes inherited from UObject
const UClass Class
const UObject Outer
const UPackage Outermost
const UPackage Package
const UWorld World
const FName Name
const bool IsRooted

Member Function Documentation

◆ AddPerceptionHandler()

FPerceptionHandler & AddPerceptionHandler ( )

◆ ApplyAwarenessOfAllCharactersSensedBy()

int ApplyAwarenessOfAllCharactersSensedBy ( const AGothicCharacter SensingCharacterToSync,
float32 WithinDistance = - 1.000000 )

Applies the awareness the SensingCharacter has of other characters to the own awareness.

◆ CanGroundedTargetBePotentiallyReached()

bool CanGroundedTargetBePotentiallyReached ( const AGothicCharacter Target,
float32 ReachRangeXY,
float32 ReachRangeZ ) const

Fast reachability check using cached perception path.

◆ CanHear()

bool CanHear ( const AGothicCharacter OtherCharacter,
float32 MinTimeSeconds = 0.000000,
float32 AwarenessThreshold = 0.000000 ) const

Returns true, if this character can hear the other character right now.

◆ CanSee()

bool CanSee ( const AGothicCharacter OtherCharacter,
float32 MinTimeSeconds = 0.000000,
float32 AwarenessThreshold = 0.000000 ) const

Returns true, if this character can see the other character right now.

◆ CanSense()

bool CanSense ( const AGothicCharacter OtherCharacter,
float32 MinTimeSeconds = 0.000000 ) const

Returns true, if this character can (in some way) perceive the other character right now.

◆ CanSmell()

bool CanSmell ( const AGothicCharacter OtherCharacter,
float32 MinTimeSeconds = 0.000000,
float32 AwarenessThreshold = 0.000000 ) const

Returns true, if this character can smell the other character right now.

◆ Create()

UCharacterPerceptionComponent Create ( AActor Actor,
FName WithName = NAME_None )
static

◆ Get()

UCharacterPerceptionComponent Get ( const AActor Actor,
FName WithName = NAME_None )
static

◆ GetAllPotentiallyReachableCharactersInRadiusSortedByDistance()

TArray< AGothicCharacter > GetAllPotentiallyReachableCharactersInRadiusSortedByDistance ( float32 Radius) const

Returns all characters that might be reachable by pathfollowing, sorted closest to furthest (pathlength).

◆ GetAllSensedCharacters()

TArray< AGothicCharacter > GetAllSensedCharacters ( FGameplayTagContainer IncludeCharactersWith,
FGameplayTagContainer ExcludeCharactersWith,
EPerceptionSense ViaSense = EPerceptionSense :: None,
bool bRequiresFullAwareness = false,
float32 MinAwareness = 0.000000 ) const

Returns all characters that are perceived in some way right now.

◆ GetAllSensedCharactersMatchingPerceptionHandler()

TArray< AGothicCharacter > GetAllSensedCharactersMatchingPerceptionHandler ( FPerceptionHandlerHandle Handler) const

Returns all sensed Characters currently perceived by the given perception handler.

◆ GetAllSensedCharactersWithHostility()

TArray< AGothicCharacter > GetAllSensedCharactersWithHostility ( ERelationshipHostility Hostility,
FGameplayTagContainer IncludeCharactersWith,
FGameplayTagContainer ExcludeCharactersWith,
EPerceptionSense ViaSense = EPerceptionSense :: None,
bool bRequiresFullAwareness = false,
float32 MinAwareness = 0.000000 ) const

Returns all characters that are perceived in some way right now and have the given hostility.

◆ GetAllSensedCharactersWithRelationship()

TArray< AGothicCharacter > GetAllSensedCharactersWithRelationship ( ERelationship Relationship,
FGameplayTagContainer IncludeCharactersWith,
FGameplayTagContainer ExcludeCharactersWith,
EPerceptionSense ViaSense = EPerceptionSense :: None,
bool bRequiresFullAwareness = false,
float32 MinAwareness = 0.000000 ) const

Returns all characters that are perceived in some way right now and have the given relationship.

◆ GetAllSensedItemsMatchingPerceptionHandler()

TArray< AItemVisualWorld > GetAllSensedItemsMatchingPerceptionHandler ( FPerceptionHandlerHandle Handler) const

Returns all sensed Items currently perceived by the given perception handler.

◆ GetAwarenessToCharacter()

float32 GetAwarenessToCharacter ( const AGothicCharacter Target,
EPerceptionSense ViaSense ) const

◆ GetHearingCapabilities()

const FPerceptionHearingSettings & GetHearingCapabilities ( ) const

Returns how good this character can hear.

◆ GetHostileCharactersPerceivingMe()

TArray< AGothicCharacter > GetHostileCharactersPerceivingMe ( float32 Radius = 0.000000) const

◆ GetMemory()

const FPerceptionShortTermMemory & GetMemory ( ) const

◆ GetOrCreate()

UCharacterPerceptionComponent GetOrCreate ( AActor Actor,
FName WithName = NAME_None )
static

◆ GetOwnerCharacter()

AGothicCharacter GetOwnerCharacter ( ) const

Access to the character that owns this component. (Usually Component's Owner-Actor).

◆ GetReceivedLogicalLight()

FLinearColor GetReceivedLogicalLight ( ) const

Returns how much LogicalLight was has received.

◆ GetReceivedLogicalLightIntensity()

float32 GetReceivedLogicalLightIntensity ( ) const

Returns how much LogicalLight was has received.

◆ GetSensedDeadCharacters()

TArray< AGothicCharacter > GetSensedDeadCharacters ( EPerceptionSense ViaSense = EPerceptionSense :: None) const

Returns all dead (not defeated) characters that are perceived in some way right now.

◆ GetSensedLivingCharacters()

TArray< AGothicCharacter > GetSensedLivingCharacters ( EPerceptionSense ViaSense = EPerceptionSense :: None,
bool bIncludeDefeated = false ) const

Returns all non dead characters that are perceived in some way right now.

◆ GetSightCapabilities()

const FPerceptionSightSettings & GetSightCapabilities ( ) const

Returns how good this character can hear.

◆ GetSumLevelOfSensedCharactersMatchingPerceptionHandler()

float32 GetSumLevelOfSensedCharactersMatchingPerceptionHandler ( FPerceptionHandlerHandle Handler) const

Returns the combined level of all sensed Characters filterd by the conditions of a perception handler.

◆ IsCharacterPotentiallyReachable()

bool IsCharacterPotentiallyReachable ( const AGothicCharacter OtherCharacter) const

Fast lookup if there is a cached perception-path to the given character. Ignores navlink conditions and area costs.

◆ ReportPerceptionEvent()

void ReportPerceptionEvent ( FGameplayTag EventTag,
FVector AtLocation,
AGothicCharacter SensedCharacter,
AActor TargetActor = nullptr,
AActor InstigatorActor = nullptr,
AActor AffectedActor = nullptr )

Stores the given perception in this characters memory and broadcasts it to everybody sensing us.

◆ SetAwarenessToCharacter()

void SetAwarenessToCharacter ( const AGothicCharacter Target,
EPerceptionSense ViaSense,
float32 Awareness )

◆ ShareAwarenessWithAllSensedCharacters()

int ShareAwarenessWithAllSensedCharacters ( const AGothicCharacter SensedCharacterToSync,
float32 WithinDistance = - 1.000000 )

Applies our awareness of the given character to all other characters that we can sense.

◆ StaticClass()

UClass StaticClass ( )
static

Member Data Documentation

◆ HearingCapabilities

const FPerceptionHearingSettings HearingCapabilities

Returns how good this character can hear.

◆ Memory

◆ OwnerCharacter

const AGothicCharacter OwnerCharacter

Access to the character that owns this component. (Usually Component's Owner-Actor).

◆ ReceivedLogicalLight

const FLinearColor ReceivedLogicalLight

Returns how much LogicalLight was has received.

◆ ReceivedLogicalLightIntensity

const float32 ReceivedLogicalLightIntensity

Returns how much LogicalLight was has received.

◆ SightCapabilities

const FPerceptionSightSettings SightCapabilities

Returns how good this character can hear.