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

Handles interaction spots and objects in the world. More...

Public Member Functions

Functions
bool IsSpotBlockedByClaimedOtherSpot (FInteractionSpotHandle Spot) const
bool CanPawnClaimSpot (FInteractionSpotHandle Spot, const AGothicCharacterState PotentialUser, FGameplayTag Action) const
 Returns true if the given character can use the spot.
bool CanPawnClaimSpotAndHasAbilityForAction (FInteractionSpotHandle Spot, const AGothicCharacterState PotentialUser, FGameplayTag Action) const
 Only call when you are sure not to provoke endless loop, e.g. from GameplayAbility::ShouldAbilityRespondToEvent().
FInteractionSpotClaimToken ClaimSpot (FInteractionSpotHandle Spot, AGothicCharacterState User, FGameplayTag Action)
 Lets the given pawn claim the given spot.
TArray< FString > DebugCanPawnClaimSpotFailReason (FInteractionSpotHandle Spot, AGothicCharacterState PotentialUser, FGameplayTag Action) const
 Outputs a string saying why the spot could not be claimed by the given user.
FInteractionSpotHandle FindSpotByName (FName Name) const
 Finds the spot with the given name. Returns invalid handle if no such spot was found.
FName GenerateUniqueSpotName (FString BasedOn="InteractionSpot") const
 Returns a new spot name that is unique in some generic format.
bool HasPawnAbilityToUseSpot (FInteractionSpotHandle Spot, const AGothicCharacterState PotentialUser, FGameplayTag Action) const
 Could user start using this spot in this very moment?
FInteractionSpotHandle AddSpot (FInteractionSpot Spot)
 Registers a new interaction spot in the world. Make sure the name is unique or none!
bool IsSpotClaimedBy (FInteractionSpotHandle Spot, const AGothicCharacterState User) const
void MoveSpot (FInteractionSpotHandle Spot, FTransform NewTransform)
 Moves the given spot to some other location.
void RemoveSpot (FInteractionSpotHandle Spot)
 Removes the given interactionspot from the world.
void ResetAllCooldowns ()
 To be used for testing. Resets all cooldowns of all spots so they are usuable again.
FInteractionSpotUseToken UseSpot (FInteractionSpotClaimToken ClaimToken)
 Lets the given pawn use the (previously claimed) given spot.
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 UClass StaticClass ()
static UInteractionSubsystem Get ()
static UInteractionSubsystem GetInteractionSpots ()
 Access to this worlds interaction spot manager.
Static Public Member Functions inherited from UWorldSubsystem
static UClass StaticClass ()
Static Public Member Functions inherited from USubsystem
static UClass StaticClass ()
Static Public Member Functions inherited from UObject
static UClass StaticClass ()

Additional Inherited Members

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

Detailed Description

Handles interaction spots and objects in the world.

Member Function Documentation

◆ AddSpot()

Registers a new interaction spot in the world. Make sure the name is unique or none!

◆ CanPawnClaimSpot()

bool CanPawnClaimSpot ( FInteractionSpotHandle Spot,
const AGothicCharacterState PotentialUser,
FGameplayTag Action ) const

Returns true if the given character can use the spot.

◆ CanPawnClaimSpotAndHasAbilityForAction()

bool CanPawnClaimSpotAndHasAbilityForAction ( FInteractionSpotHandle Spot,
const AGothicCharacterState PotentialUser,
FGameplayTag Action ) const

Only call when you are sure not to provoke endless loop, e.g. from GameplayAbility::ShouldAbilityRespondToEvent().

◆ ClaimSpot()

Lets the given pawn claim the given spot.

Returns
Valid claim token, if claiming was possible. (checked via CanPawnClaimSpot)

◆ DebugCanPawnClaimSpotFailReason()

TArray< FString > DebugCanPawnClaimSpotFailReason ( FInteractionSpotHandle Spot,
AGothicCharacterState PotentialUser,
FGameplayTag Action ) const

Outputs a string saying why the spot could not be claimed by the given user.

◆ FindSpotByName()

FInteractionSpotHandle FindSpotByName ( FName Name) const

Finds the spot with the given name. Returns invalid handle if no such spot was found.

◆ GenerateUniqueSpotName()

FName GenerateUniqueSpotName ( FString BasedOn = "InteractionSpot") const

Returns a new spot name that is unique in some generic format.

◆ Get()

UInteractionSubsystem Get ( )
static

◆ GetInteractionSpots()

UInteractionSubsystem GetInteractionSpots ( )
static

Access to this worlds interaction spot manager.

◆ HasPawnAbilityToUseSpot()

bool HasPawnAbilityToUseSpot ( FInteractionSpotHandle Spot,
const AGothicCharacterState PotentialUser,
FGameplayTag Action ) const

Could user start using this spot in this very moment?

◆ IsSpotBlockedByClaimedOtherSpot()

bool IsSpotBlockedByClaimedOtherSpot ( FInteractionSpotHandle Spot) const
Returns
True if the given spot would be free, but is blocked because another spot of the same owner is in use

◆ IsSpotClaimedBy()

bool IsSpotClaimedBy ( FInteractionSpotHandle Spot,
const AGothicCharacterState User ) const
Returns
True if the given actor is currently claiming the given spot.

◆ MoveSpot()

void MoveSpot ( FInteractionSpotHandle Spot,
FTransform NewTransform )

Moves the given spot to some other location.

◆ RemoveSpot()

void RemoveSpot ( FInteractionSpotHandle Spot)

Removes the given interactionspot from the world.

◆ ResetAllCooldowns()

void ResetAllCooldowns ( )

To be used for testing. Resets all cooldowns of all spots so they are usuable again.

◆ StaticClass()

UClass StaticClass ( )
static

◆ UseSpot()

Lets the given pawn use the (previously claimed) given spot.

Returns
Valid use token, if using was possible.