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

Equipped: This means an object is ACTIVE on a character (e.g., a weapon currently in hand or armor in an active armor slot). The specific "how" or "why" isn't the focus here; the key is that "Equipped" equals "Active. More...

Public Member Functions

Functions
void Multicast_SetHiddenInGame (bool newHidden)
EWeaponSkill GetCurrentWeaponSkill () const
 Get the skill the character has with the equipped weapon Needs to be updated for bow and crossbows skills.
UItemDefinition GetEquippedItemDefinition () const
 To use it in AngelScript.
AItemVisual GetInventoryItemVisual (EInventoryTypes inventory)
UItemDefinition GetItemDefinition (EVisualCarrySlot slot) const
 To use it in AngelScript.
AItemVisual GetItemVisual () const
EWeaponSkill GetWeaponSkillByDefinition (const UItemDefinition itemDefinition) const
EWeaponSkill GetWeaponSkillByType (FGameplayTag itemTag) const
bool IsEquippedWeaponAllowedTraverse ()
bool IsEquippedWeaponAThreat ()
bool IsEquippedWeaponLeft ()
bool IsHidden () const
void Local_SetHiddenInGameByInventoryType (bool newHidden, EInventoryTypes inventoryType)
void Multicast_AttachVisualItem (EInventoryTypes invType, int slotId, EVisualCarrySlot carrySlot, bool locallyPredicted, TSubclassOf< UObject > extraData, int magnitude, bool throwing)
 UFUNCTION() void EquipItem(EInventoryTypes invType, int slotId, bool locallyPredicted = false, TSubclassOf<UObject> extraData = nullptr, int magnitude = 0, bool throwing = false);.
void Multicast_DetachAmmo (bool LocallyPredicted)
void Multicast_ForceUnequip (UGothicAbilitySystemComponent gothicAbComp) const
void AddAttachedItem (EInventoryTypes invType, int slot, EVisualCarrySlot carrySlot)
void Multicast_SetHiddenInGameByInventoryType (bool newHidden, EInventoryTypes inventoryType)
void Multicast_UnAttachVisual (EVisualCarrySlot carrySlot, EInventoryTypes invType, int slotId, bool locallyPredicted, bool forced)
void RecalculateCurrentWeight ()
void Server_SetHiddenInGame (bool newHidden)
void Server_SetHiddenInGameByInventoryType (bool newHidden, EInventoryTypes inventoryType)
void Server_SpawnBasicInventoryItem (FItemVirtualData itemToSpawn, bool mustDrop, FVector origin, FQuat rot, FVector impulse, bool isGeneric)
void Server_ThrowItem (FItemVirtualData itemToSpawn, FVector startPosition, FQuat rot, bool isDrop, FVector impulse)
void Server_ThrowItemB (FItemVirtualData itemToSpawn, FVector origin, FQuat rot, FVector impulse)
void Server_UI_Attach (EInventoryTypes invType, EInventoryTypes originType, bool locallyPredicted)
void SetHiddenInGame (bool newHidden)
void SetHiddenInGameByInventoryType (bool newHidden, EInventoryTypes inventoryType)
void UnAttachedItem (EInventoryTypes invType, EVisualCarrySlot carrySlot)
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 UCarryComponent Get (const AActor Actor, FName WithName=NAME_None)
static UCarryComponent GetOrCreate (AActor Actor, FName WithName=NAME_None)
static UCarryComponent 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
FOnItemThrowed OnItemThrowed
FOnItemUnEquipped OnItemUnEquipped
const EWeaponSkill CurrentWeaponSkill
 Get the skill the character has with the equipped weapon Needs to be updated for bow and crossbows skills.
const UItemDefinition EquippedItemDefinition
 To use it in AngelScript.
const AItemVisual ItemVisual
FOnItemEquipped OnItemEquipped
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

Detailed Description

Equipped: This means an object is ACTIVE on a character (e.g., a weapon currently in hand or armor in an active armor slot). The specific "how" or "why" isn't the focus here; the key is that "Equipped" equals "Active.

Equip / Unequip: The action of moving an object from the Inventory to the Equipped status or the contrary. This is context-sensitive; for a weapon, this usually involves a "Draw" action, while armor simply requires being placed in the correct slot.

Draw / Undraw: The specific actions used to equip or unequip a weapon. These can be animated or instantaneous depending on the weapon. And remember, only weapons draw/undraw

Note on QuickBars: You do not "equip" a weapon from the main inventory to the QuickBar. That is simply moving an item or assigning it to a slot. And yes, there is some confusion here because armor and thrinkets need to be moved to a slot to be equip, but NEVER a quickbar slot, always the specific slot.

Member Function Documentation

◆ AddAttachedItem()

void AddAttachedItem ( EInventoryTypes invType,
int slot,
EVisualCarrySlot carrySlot )

◆ Create()

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

◆ Get()

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

◆ GetCurrentWeaponSkill()

EWeaponSkill GetCurrentWeaponSkill ( ) const

Get the skill the character has with the equipped weapon Needs to be updated for bow and crossbows skills.

Returns
Returns the EWeapon skill related to the current weapon. Returns EWeaponSkill if an item is equipped instead

◆ GetEquippedItemDefinition()

UItemDefinition GetEquippedItemDefinition ( ) const

To use it in AngelScript.

◆ GetInventoryItemVisual()

AItemVisual GetInventoryItemVisual ( EInventoryTypes inventory)

◆ GetItemDefinition()

UItemDefinition GetItemDefinition ( EVisualCarrySlot slot) const

To use it in AngelScript.

◆ GetItemVisual()

AItemVisual GetItemVisual ( ) const

◆ GetOrCreate()

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

◆ GetWeaponSkillByDefinition()

EWeaponSkill GetWeaponSkillByDefinition ( const UItemDefinition itemDefinition) const

◆ GetWeaponSkillByType()

EWeaponSkill GetWeaponSkillByType ( FGameplayTag itemTag) const

◆ IsEquippedWeaponAllowedTraverse()

bool IsEquippedWeaponAllowedTraverse ( )

◆ IsEquippedWeaponAThreat()

bool IsEquippedWeaponAThreat ( )

◆ IsEquippedWeaponLeft()

bool IsEquippedWeaponLeft ( )

◆ IsHidden()

bool IsHidden ( ) const

◆ Local_SetHiddenInGameByInventoryType()

void Local_SetHiddenInGameByInventoryType ( bool newHidden,
EInventoryTypes inventoryType )

◆ Multicast_AttachVisualItem()

void Multicast_AttachVisualItem ( EInventoryTypes invType,
int slotId,
EVisualCarrySlot carrySlot,
bool locallyPredicted,
TSubclassOf< UObject > extraData,
int magnitude,
bool throwing )

UFUNCTION() void EquipItem(EInventoryTypes invType, int slotId, bool locallyPredicted = false, TSubclassOf<UObject> extraData = nullptr, int magnitude = 0, bool throwing = false);.

◆ Multicast_DetachAmmo()

void Multicast_DetachAmmo ( bool LocallyPredicted)

◆ Multicast_ForceUnequip()

void Multicast_ForceUnequip ( UGothicAbilitySystemComponent gothicAbComp) const

◆ Multicast_SetHiddenInGame()

void Multicast_SetHiddenInGame ( bool newHidden)

◆ Multicast_SetHiddenInGameByInventoryType()

void Multicast_SetHiddenInGameByInventoryType ( bool newHidden,
EInventoryTypes inventoryType )

◆ Multicast_UnAttachVisual()

void Multicast_UnAttachVisual ( EVisualCarrySlot carrySlot,
EInventoryTypes invType,
int slotId,
bool locallyPredicted,
bool forced )

◆ RecalculateCurrentWeight()

void RecalculateCurrentWeight ( )

◆ Server_SetHiddenInGame()

void Server_SetHiddenInGame ( bool newHidden)

◆ Server_SetHiddenInGameByInventoryType()

void Server_SetHiddenInGameByInventoryType ( bool newHidden,
EInventoryTypes inventoryType )

◆ Server_SpawnBasicInventoryItem()

void Server_SpawnBasicInventoryItem ( FItemVirtualData itemToSpawn,
bool mustDrop,
FVector origin,
FQuat rot,
FVector impulse,
bool isGeneric )

◆ Server_ThrowItem()

void Server_ThrowItem ( FItemVirtualData itemToSpawn,
FVector startPosition,
FQuat rot,
bool isDrop,
FVector impulse )

◆ Server_ThrowItemB()

void Server_ThrowItemB ( FItemVirtualData itemToSpawn,
FVector origin,
FQuat rot,
FVector impulse )

◆ Server_UI_Attach()

void Server_UI_Attach ( EInventoryTypes invType,
EInventoryTypes originType,
bool locallyPredicted )

◆ SetHiddenInGame()

void SetHiddenInGame ( bool newHidden)

◆ SetHiddenInGameByInventoryType()

void SetHiddenInGameByInventoryType ( bool newHidden,
EInventoryTypes inventoryType )

◆ StaticClass()

UClass StaticClass ( )
static

◆ UnAttachedItem()

void UnAttachedItem ( EInventoryTypes invType,
EVisualCarrySlot carrySlot )

Member Data Documentation

◆ CurrentWeaponSkill

const EWeaponSkill CurrentWeaponSkill

Get the skill the character has with the equipped weapon Needs to be updated for bow and crossbows skills.

◆ EquippedItemDefinition

const UItemDefinition EquippedItemDefinition

To use it in AngelScript.

◆ ItemVisual

const AItemVisual ItemVisual

◆ OnItemEquipped

FOnItemEquipped OnItemEquipped

◆ OnItemThrowed

FOnItemThrowed OnItemThrowed

◆ OnItemUnEquipped

FOnItemUnEquipped OnItemUnEquipped