|
G1R AngelScript
Scripting reference for the Gothic 1 Remake
|
Public Member Functions | |
Functions | |
| const FPerceptionSightSettings & | GetSightCapabilities (const UCharacterPerceptionComponent CharacterPerceptionComponent) const |
| Returns how good this character can hear. | |
| bool | CanAnyPlayerSee (const AActor Actor, float32 MinTimeSeconds=0.000000, float32 AwarenessThreshold=0.000000) const |
| Returns true if any player can see the given character. | |
| bool | CanSee (const AGothicCharacter Character, const AGothicCharacter Other, float32 MinTimeSeconds=0.000000, float32 AwarenessThreshold=0.000000) const |
| Returns true if the given Character can see Other. | |
| bool | CanSense (const AGothicCharacter Character, const AGothicCharacter Other, float32 MinTimeSeconds=0.000000) const |
| Returns true if the given Character can sense Other. | |
| void | FillPerceivedAgent (FPerceivedAgent &Out, FPerceptionAgentHandle Sensing, FPerceptionAgentHandle Perceived) const |
| FGameplayTagContainer | GetAgentTagsOfActor (AActor Actor) const |
| FGameplayTagContainer | GetAgentTagsOfAgent (FPerceptionAgentHandle Agent) const |
| TArray< AGothicCharacter > | GetAllCharactersSensing (const AActor SensedActor, EPerceptionSense ViaSense, FGameplayTagContainer IncludeCharactersWith, FGameplayTagContainer ExcludeCharactersWith, float32 MinAwareness=50.000000) const |
| Returns a list of all characters that perceive the given character. | |
| TArray< AGothicCharacter > | GetAllHostilesSensingCharacter (const AGothicCharacter SensedCharacter, EPerceptionSense ViaSense, FGameplayTagContainer IncludeCharactersWith, FGameplayTagContainer ExcludeCharactersWith, float32 MinAwareness=50.000000) const |
| Returns a list of all characters that are hostile to and sense the given character. | |
| TArray< AGothicCharacter > | GetAllSensedCharacters (AGothicCharacter PerceivedBy, FGameplayTagContainer IncludeCharactersWith, FGameplayTagContainer ExcludeCharactersWith, EPerceptionSense ViaSense=EPerceptionSense ::None, bool bRequiresFullAwareness=false, float32 MinAwareness=50.000000) const |
| Returns a list of all characters that the given character can perceive in some way. | |
| TArray< AGothicCharacter > | GetAllSensedCharactersWithRelationship (AGothicCharacter PerceivedBy, ERelationship Relationship, ERelationshipHostility Hostility, FGameplayTagContainer IncludeCharactersWith, FGameplayTagContainer ExcludeCharactersWith, EPerceptionSense ViaSense=EPerceptionSense ::None, bool bRequiresFullAwareness=false, float32 MinAwareness=50.000000) const |
| Returns a list of all characters that the given character can perceive in some way and who have the given relationship. | |
| TSet< AGothicCharacter > | GetCharactersPerceivedByHandler (FPerceptionHandlerHandle HandlerHandle, bool bCheckForTags=true) const |
| Returns all characters that the given handler has gained perception of right now. | |
| const FPerceptionHearingSettings & | GetHearingCapabilities (const UCharacterPerceptionComponent CharacterPerceptionComponent) const |
| Returns how good this character can hear. | |
| TSet< AItemVisualWorld > | GetItemsPerceivedByHandler (FPerceptionHandlerHandle HandlerHandle) const |
| Returns all items that the given handler has gained perception of right now. | |
| void | BroadcastPerceptionEvent (FGameplayTag EventTag, FVector AtLocation, const AActor OriginActor, const AActor TargetActor, const AActor InstigatorActor, const AActor AffectedActor, const AActor EffectCauser, FGameplayTagContainer EffectCauserTags, float32 Magnitude=0.000000, float32 EstimatedSecondsUntilImpact=0.000000) |
| Puts a custom event into the given SensingCharacters memory and broadcasts it to all sensing characters. | |
| FPerceptionAgentHandle | GetViewTargetAgent (FPerceptionAgentHandle SensingAgent) const |
| Returns handle of agent the given agent is looking at. Returns an unsetted handle if the agent isn't looking at any other agent. | |
| bool | HasFreeLineOfSightBetween (const AGothicCharacter Character, const AGothicCharacter Other) const |
| Returns true if there was a unobstructed raycast between the two characters heads. | |
| bool | HasPotentialPathBetween (const AGothicCharacter Character, const AGothicCharacter Other) const |
| Returns true if there might be a path between the two agents (uses pathfinding queries done for hearing perceptions). | |
| bool | IsInHearingRangeOfAnyPlayer (const AActor Actor, EPerceptionNoiseLoudness Loudness) const |
| Returns true if any player can see the given character. | |
| void | ReportSoundShort (AActor Instigator, FGameplayTag SoundTag, FVector AtLocation, EPerceptionNoiseLoudness Loudness, float32 WaitSeconds=0.000000, bool IsBoundToOriginActor=true) |
| Call when someone made a noise that is very short. | |
| FPerceptionSoundAreaHandle | ReportSoundWithDuration (AActor Instigator, FGameplayTag SoundTag, FVector AtLocation, EPerceptionNoiseLoudness Loudness, float32 Duration, bool IsBoundToOriginActor=true) |
| Call when someone made a noise that can be heard for some time. | |
| FPerceptionSoundAreaHandle | ReportSoundWithInfiniteDuration (AActor Instigator, FGameplayTag SoundTag, FVector AtLocation, EPerceptionNoiseLoudness Loudness, bool IsBoundToOriginActor=true) |
| Call when someone made a noise that is looping indefinitely. | |
| void | StopSoundEvent (FPerceptionSoundAreaHandle AreaEventHandle) |
| Stops an ongoing sound event earlier than its specified duration. | |
| void | TestRemoveAllPerceptionHandlers () |
| Can be called to completely empty the perception system from all handlers for testing. Usecase is to call this first, and then add a single specific handler. | |
| bool | TryCreatePerceptionEvent (const AGothicCharacter EventSensedBy, FGameplayTag EventTag, FVector AtLocation, FVector AtNavLocation, const AActor OriginActor, const AActor TargetActor, const AActor InstigatorActor, const AActor AffectedActor, FRememberedPerception &Perception) |
Static Public Member Functions | |
Static Functions | |
| static UClass | StaticClass () |
| static UPerceptionSystem | Get () |
| static bool & | DebugGetIgnorePlayerPerceptionsRef () |
| void BroadcastPerceptionEvent | ( | FGameplayTag | EventTag, |
| FVector | AtLocation, | ||
| const AActor | OriginActor, | ||
| const AActor | TargetActor, | ||
| const AActor | InstigatorActor, | ||
| const AActor | AffectedActor, | ||
| const AActor | EffectCauser, | ||
| FGameplayTagContainer | EffectCauserTags, | ||
| float32 | Magnitude = 0.000000, | ||
| float32 | EstimatedSecondsUntilImpact = 0.000000 ) |
Puts a custom event into the given SensingCharacters memory and broadcasts it to all sensing characters.
| bool CanAnyPlayerSee | ( | const AActor | Actor, |
| float32 | MinTimeSeconds = 0.000000, | ||
| float32 | AwarenessThreshold = 0.000000 ) const |
Returns true if any player can see the given character.
| bool CanSee | ( | const AGothicCharacter | Character, |
| const AGothicCharacter | Other, | ||
| float32 | MinTimeSeconds = 0.000000, | ||
| float32 | AwarenessThreshold = 0.000000 ) const |
Returns true if the given Character can see Other.
| bool CanSense | ( | const AGothicCharacter | Character, |
| const AGothicCharacter | Other, | ||
| float32 | MinTimeSeconds = 0.000000 ) const |
Returns true if the given Character can sense Other.
|
static |
| void FillPerceivedAgent | ( | FPerceivedAgent & | Out, |
| FPerceptionAgentHandle | Sensing, | ||
| FPerceptionAgentHandle | Perceived ) const |
|
static |
| FGameplayTagContainer GetAgentTagsOfActor | ( | AActor | Actor | ) | const |
| FGameplayTagContainer GetAgentTagsOfAgent | ( | FPerceptionAgentHandle | Agent | ) | const |
| TArray< AGothicCharacter > GetAllCharactersSensing | ( | const AActor | SensedActor, |
| EPerceptionSense | ViaSense, | ||
| FGameplayTagContainer | IncludeCharactersWith, | ||
| FGameplayTagContainer | ExcludeCharactersWith, | ||
| float32 | MinAwareness = 50.000000 ) const |
Returns a list of all characters that perceive the given character.
| TArray< AGothicCharacter > GetAllHostilesSensingCharacter | ( | const AGothicCharacter | SensedCharacter, |
| EPerceptionSense | ViaSense, | ||
| FGameplayTagContainer | IncludeCharactersWith, | ||
| FGameplayTagContainer | ExcludeCharactersWith, | ||
| float32 | MinAwareness = 50.000000 ) const |
Returns a list of all characters that are hostile to and sense the given character.
| TArray< AGothicCharacter > GetAllSensedCharacters | ( | AGothicCharacter | PerceivedBy, |
| FGameplayTagContainer | IncludeCharactersWith, | ||
| FGameplayTagContainer | ExcludeCharactersWith, | ||
| EPerceptionSense | ViaSense = EPerceptionSense :: None, | ||
| bool | bRequiresFullAwareness = false, | ||
| float32 | MinAwareness = 50.000000 ) const |
Returns a list of all characters that the given character can perceive in some way.
| TArray< AGothicCharacter > GetAllSensedCharactersWithRelationship | ( | AGothicCharacter | PerceivedBy, |
| ERelationship | Relationship, | ||
| ERelationshipHostility | Hostility, | ||
| FGameplayTagContainer | IncludeCharactersWith, | ||
| FGameplayTagContainer | ExcludeCharactersWith, | ||
| EPerceptionSense | ViaSense = EPerceptionSense :: None, | ||
| bool | bRequiresFullAwareness = false, | ||
| float32 | MinAwareness = 50.000000 ) const |
Returns a list of all characters that the given character can perceive in some way and who have the given relationship.
| TSet< AGothicCharacter > GetCharactersPerceivedByHandler | ( | FPerceptionHandlerHandle | HandlerHandle, |
| bool | bCheckForTags = true ) const |
Returns all characters that the given handler has gained perception of right now.
| const FPerceptionHearingSettings & GetHearingCapabilities | ( | const UCharacterPerceptionComponent | CharacterPerceptionComponent | ) | const |
Returns how good this character can hear.
| TSet< AItemVisualWorld > GetItemsPerceivedByHandler | ( | FPerceptionHandlerHandle | HandlerHandle | ) | const |
Returns all items that the given handler has gained perception of right now.
| const FPerceptionSightSettings & GetSightCapabilities | ( | const UCharacterPerceptionComponent | CharacterPerceptionComponent | ) | const |
Returns how good this character can hear.
| FPerceptionAgentHandle GetViewTargetAgent | ( | FPerceptionAgentHandle | SensingAgent | ) | const |
Returns handle of agent the given agent is looking at. Returns an unsetted handle if the agent isn't looking at any other agent.
| bool HasFreeLineOfSightBetween | ( | const AGothicCharacter | Character, |
| const AGothicCharacter | Other ) const |
Returns true if there was a unobstructed raycast between the two characters heads.
| bool HasPotentialPathBetween | ( | const AGothicCharacter | Character, |
| const AGothicCharacter | Other ) const |
Returns true if there might be a path between the two agents (uses pathfinding queries done for hearing perceptions).
| bool IsInHearingRangeOfAnyPlayer | ( | const AActor | Actor, |
| EPerceptionNoiseLoudness | Loudness ) const |
Returns true if any player can see the given character.
| void ReportSoundShort | ( | AActor | Instigator, |
| FGameplayTag | SoundTag, | ||
| FVector | AtLocation, | ||
| EPerceptionNoiseLoudness | Loudness, | ||
| float32 | WaitSeconds = 0.000000, | ||
| bool | IsBoundToOriginActor = true ) |
Call when someone made a noise that is very short.
| FPerceptionSoundAreaHandle ReportSoundWithDuration | ( | AActor | Instigator, |
| FGameplayTag | SoundTag, | ||
| FVector | AtLocation, | ||
| EPerceptionNoiseLoudness | Loudness, | ||
| float32 | Duration, | ||
| bool | IsBoundToOriginActor = true ) |
Call when someone made a noise that can be heard for some time.
Note: Use the returned handle to stop this sound perception earlier than the given duration.
| FPerceptionSoundAreaHandle ReportSoundWithInfiniteDuration | ( | AActor | Instigator, |
| FGameplayTag | SoundTag, | ||
| FVector | AtLocation, | ||
| EPerceptionNoiseLoudness | Loudness, | ||
| bool | IsBoundToOriginActor = true ) |
Call when someone made a noise that is looping indefinitely.
Note: Use the returned handle to stop this sound perception at some point.
|
static |
| void StopSoundEvent | ( | FPerceptionSoundAreaHandle | AreaEventHandle | ) |
Stops an ongoing sound event earlier than its specified duration.
| void TestRemoveAllPerceptionHandlers | ( | ) |
Can be called to completely empty the perception system from all handlers for testing. Usecase is to call this first, and then add a single specific handler.
| bool TryCreatePerceptionEvent | ( | const AGothicCharacter | EventSensedBy, |
| FGameplayTag | EventTag, | ||
| FVector | AtLocation, | ||
| FVector | AtNavLocation, | ||
| const AActor | OriginActor, | ||
| const AActor | TargetActor, | ||
| const AActor | InstigatorActor, | ||
| const AActor | AffectedActor, | ||
| FRememberedPerception & | Perception ) |