G1R AngelScript
Scripting reference for the Gothic 1 Remake
Loading...
Searching...
No Matches
FInteractionSpotHandle Struct Reference

Public Member Functions

Functions
void Invalidate ()
 Clears this handle so it does not point to any spot anymore.
FBox2D BoundingBox2D () const
bool CanBeClaimedBy (AGothicCharacterState PotentialUser, FGameplayTag Action) const
 Returns whether the given user could claim this spot with the given action right now.
bool CanBeClaimedBy_TryMultipleActions (AGothicCharacterState PotentialUser, FGameplayTagContainer Actions) const
 Returns whether the given user could claim this spot with one of the given actions right now.
bool CanBeUsedBy (AGothicCharacterState PotentialUser, FGameplayTag Action) const
 Returns whether the given user could use this spot with the given action right now.
bool CanBeUsedBy_TryMultipleActions (AGothicCharacterState PotentialUser, FGameplayTagContainer Actions) const
 Returns whether the given user could use this spot with one of the given actions right now.
FInteractionSpotClaimToken Claim (AGothicCharacterState User, FGameplayTag Action)
 Marks this spot as "Claimed" by the given user. Returns invalid token if the spot could not be claimed.
AActor GetActorToInteractWith () const
FGameplayTagContainer GetAllAreasFromSpotHandle (const UObject WorldContextObject) const
bool GetAllowsChainingActions () const
UAreaTagRegionTrait GetAreaFromSpotHandle (const UObject WorldContextObject) const
float32 GetAreaRadius () const
float32 GetDistanceToActor (AActor Actor) const
FVector GetForwardDirection () const
FVector GetLocation () const
float32 GetPathCostFrom (const AGothicCharacterState PotentialUser) const
FTransform GetTransform () const
FInteractionSpotHandle & opAssign (FName SpotName)
bool IsActionPossibleHere (FGameplayTag Action,) const
bool IsAllowingAnyOrientationWhenUsing () const
bool IsAnyOfActionsPossibleHere (FGameplayTagContainer Actions,) const
bool IsClaimedBy (AGothicCharacterState PotentialUser) const
bool IsCustomUseConditionFulfilled (AGothicCharacterState PotentialUser, FGameplayTag Action) const
bool IsInCooldown () const
bool IsLocationWithinRange (FVector Location, float32 Radius,) const
bool IsLocationWithinRange2D (FVector2D Location, float32 Radius,) const
bool IsSet () const
bool IsUnclaimed () const
bool IsUsedBy (AGothicCharacterState PotentialUser) const
bool IsValid () const
FGameplayTag SelectMatchingMoreSpecificAction (FGameplayTag Action,) const
 If this spots only supports actions that are more specific than the given action, this function will return actual action to do.
void SetTransform (FTransform NewTransform,) const
void Unset ()
 Clears this handle so it does not point to any spot anymore.
FInteractionSpotHandle & opAssign (FInteractionSpotHandle Other)

Public Attributes

InteractionSpotHandle
FName SpotName
 Name of the spot this handle points to.

Member Function Documentation

◆ BoundingBox2D()

FBox2D BoundingBox2D ( ) const
Returns
2D bounding box around this spot.

◆ CanBeClaimedBy()

bool CanBeClaimedBy ( AGothicCharacterState PotentialUser,
FGameplayTag Action ) const

Returns whether the given user could claim this spot with the given action right now.

◆ CanBeClaimedBy_TryMultipleActions()

bool CanBeClaimedBy_TryMultipleActions ( AGothicCharacterState PotentialUser,
FGameplayTagContainer Actions ) const

Returns whether the given user could claim this spot with one of the given actions right now.

◆ CanBeUsedBy()

bool CanBeUsedBy ( AGothicCharacterState PotentialUser,
FGameplayTag Action ) const

Returns whether the given user could use this spot with the given action right now.

◆ CanBeUsedBy_TryMultipleActions()

bool CanBeUsedBy_TryMultipleActions ( AGothicCharacterState PotentialUser,
FGameplayTagContainer Actions ) const

Returns whether the given user could use this spot with one of the given actions right now.

◆ Claim()

Marks this spot as "Claimed" by the given user. Returns invalid token if the spot could not be claimed.

◆ GetActorToInteractWith()

AActor GetActorToInteractWith ( ) const
Returns
Actor that should be interacted with when using this spot.

◆ GetAllAreasFromSpotHandle()

FGameplayTagContainer GetAllAreasFromSpotHandle ( const UObject WorldContextObject) const
Returns
all Area Tags of at the Location of given Interaction Spot

◆ GetAllowsChainingActions()

bool GetAllowsChainingActions ( ) const
Returns
True, if spots allows to do multiple different interactions in one go

◆ GetAreaFromSpotHandle()

UAreaTagRegionTrait GetAreaFromSpotHandle ( const UObject WorldContextObject) const
Returns
Highest Priority Area Tag of at the Location of given Interaction Spot

◆ GetAreaRadius()

float32 GetAreaRadius ( ) const
Returns
Radius this interaction can be started from.

◆ GetDistanceToActor()

float32 GetDistanceToActor ( AActor Actor) const
Returns
Distance from this spot to the given actors location.

◆ GetForwardDirection()

FVector GetForwardDirection ( ) const
Returns
ForwardDirection of this spot. You should check whether the handle is valid before using this (returns (0,0,0) if unset)

◆ GetLocation()

FVector GetLocation ( ) const
Returns
Location of this spot. You should check whether the handle is valid before using this (returns (0,0,0) if unset)

◆ GetPathCostFrom()

float32 GetPathCostFrom ( const AGothicCharacterState PotentialUser) const
Returns
How far is this spot when using pathfinding? (MAX_flt if unreachable)

◆ GetTransform()

FTransform GetTransform ( ) const
Returns
Transform of this spot. You should check whether the handle is valid before using this (returns identity if unset)

◆ Invalidate()

void Invalidate ( )

Clears this handle so it does not point to any spot anymore.

◆ IsActionPossibleHere()

bool IsActionPossibleHere ( FGameplayTag Action) const
Returns
True if the given action is possible on this spot

◆ IsAllowingAnyOrientationWhenUsing()

bool IsAllowingAnyOrientationWhenUsing ( ) const
Returns
True if spot allows any orientation when using, or if needs the character to be aligned properly.

◆ IsAnyOfActionsPossibleHere()

bool IsAnyOfActionsPossibleHere ( FGameplayTagContainer Actions) const
Returns
True if the given container of possible actions is possible on this spot

◆ IsClaimedBy()

bool IsClaimedBy ( AGothicCharacterState PotentialUser) const
Returns
True if the given Pawn is occupying this spot right now

◆ IsCustomUseConditionFulfilled()

bool IsCustomUseConditionFulfilled ( AGothicCharacterState PotentialUser,
FGameplayTag Action ) const
Returns
True if this spot can be used according to the custom "Can Use" delegate. (Or if none is bound)

◆ IsInCooldown()

bool IsInCooldown ( ) const
Returns
True if this spot is has been occupied and is still in cooldown.

◆ IsLocationWithinRange()

bool IsLocationWithinRange ( FVector Location,
float32 Radius ) const
Returns
True if the given location is inside the area of this spot

◆ IsLocationWithinRange2D()

bool IsLocationWithinRange2D ( FVector2D Location,
float32 Radius ) const
Returns
True if the given location is inside the area of this spot

◆ IsSet()

bool IsSet ( ) const
Returns
True, if this handle is referencing a spot ("handle is not empty")

◆ IsUnclaimed()

bool IsUnclaimed ( ) const
Returns
True if nobody is using this spot right now

◆ IsUsedBy()

bool IsUsedBy ( AGothicCharacterState PotentialUser) const
Returns
True if the given Pawn is using this spot right now

◆ IsValid()

bool IsValid ( ) const
Returns
True, if this handle is referencing a spot (handle is not empty and points to a valid spot)

◆ opAssign() [1/2]

◆ opAssign() [2/2]

FInteractionSpotHandle & opAssign ( FName SpotName)

◆ SelectMatchingMoreSpecificAction()

FGameplayTag SelectMatchingMoreSpecificAction ( FGameplayTag Action) const

If this spots only supports actions that are more specific than the given action, this function will return actual action to do.

For example, when this Spot only accepts Action.Sit.Ground, and you pass in Action.Sit (which is a valid thing to do), it returns Action.Sit.Ground.

Returns EmptyTag if tag of the PossibleActions matches.

Note: The first matching tag encountered is returned. No random selection.

◆ SetTransform()

void SetTransform ( FTransform NewTransform) const
Returns
Moves this spot to some other location.

◆ Unset()

void Unset ( )

Clears this handle so it does not point to any spot anymore.

Member Data Documentation

◆ SpotName

FName SpotName

Name of the spot this handle points to.