|
G1R AngelScript
Scripting reference for the Gothic 1 Remake
|
Allows equipping items and looking through the inventory of a character. More...
Public Member Functions | |
Functions | |
| TSet< UItemDefinition > | GetEquippedItemsOfClass (TSubclassOf< UItemDefinition > ItemClass) const |
| Returns a set of equipped items matching the given type that are inside this inventory. | |
| void | AddItemOfClassInventory (TSubclassOf< UItemDefinition > ItemClass, int Count=1, EInventoryTypes inventory=EInventoryTypes ::MainContainer) |
| Adds items of the given type to the specific inventory container. | |
| bool | AttachVisualItemOfKindWithoutAnimation (TSubclassOf< UItemDefinition > ItemKind, EVisualCarrySlot AttachTo=EVisualCarrySlot ::RightHand) |
| Tries to attach (visual!) item from melee slot to hand of character. Returns true if succeeded. | |
| bool | CanEquipItemOfClass (TSubclassOf< UItemDefinition > ItemDefinitionClass) const |
| Returns true if the given character is strong enough to equip an item of the given class. Additionally, the Character needs to have animations for it. | |
| bool | CarryItemOfKind (TSubclassOf< UItemDefinition > ItemKind) const |
| Takes out an item of the given kind to Carry by triggering the PickAndCarry ability. Returns true when the PickAndCarry ability could be triggered. | |
| bool | ConsumeItemOfKind (TSubclassOf< UItemDefinition > ItemKind) |
| Tries to find and consume 1 item of the given kind, does not wait for any animations. Returns true if consuming worked. | |
| int | CountItemOfTypeInSlot (const TSubclassOf< UItemDefinition > ItemClass, EInventoryTypes InventoryType) const |
| Returns how many items of the in the given slot match the given type. | |
| int | CountItemsOfClass (TSubclassOf< UItemDefinition > ItemClass, EInventorySlotKind Inventory=EInventorySlotKind ::BasicInventory) const |
| Returns how many items of the given class are in the given inventory. | |
| int | CountItemsOfType (FGameplayTag ItemType) const |
| Returns how many items of the in the inventory match the given type. | |
| bool | DetachVisualItemOfKindWithoutAnimation (TSubclassOf< UItemDefinition > ItemKind) |
| Tries to detach (visual!) item from hand of character to melee slot. Returns true if succeeded. | |
| bool | EquipArmor (UArmorDefinition Armor) |
| Moves the given armor into the armor equip slot. Does not check whether we can actually wear the armor. | |
| bool | EquipArmorOfClass (TSubclassOf< UArmorDefinition > Armor) |
| Moves a armor of the given class into the matching equip slot. Does not check whether we can actually wear the armor. If multiple armors match the given class, chooses the first it encounters. | |
| bool | EquipItem (EInventoryTypes Type, int Slot) |
| Takes out/draws the item that is currently in the given type of inventory/slot. Does not wait for any animations. Returns true if an item was found. | |
| bool | EquipMeleeWeapon (UWeaponMeleeDefinition Weapon) |
| Moves the given weapon into the melee equip slot. Does not draw the weapon. Does not check whether we can actually hold the weapon. | |
| bool | EquipMeleeWeaponOfClass (TSubclassOf< UWeaponMeleeDefinition > Weapon) |
| Moves a weapon of the given class into the melee equip slot. Does not draw the weapon. Does not check whether we can actually hold the weapon. If multiple weapons match the given class, chooses the first it encounters. | |
| bool | EquipRangedWeapon (UWeaponArcheryDefinition Weapon) |
| Moves the given weapon into the ranged equip slot. Does not draw the weapon. Does not check whether we can actually hold the weapon. | |
| bool | EquipRangedWeaponOfClass (TSubclassOf< UWeaponArcheryDefinition > Weapon) |
| Moves a weapon of the given class into the ranged equip slot. Does not draw the weapon. Does not check whether we can actually hold the weapon. If multiple weapons match the given class, chooses the first it encounters. | |
| bool | EquipWeaponOfClass (TSubclassOf< UWeaponDefinition > Weapon) |
| Moves a weapon of the given class into the matching equip slot. Does not draw the weapon. Does not check whether we can actually hold the weapon. If multiple weapons match the given class, chooses the first it encounters. | |
| URuneSpellContainer | FindSpellOfType (FGameplayTag SpellItemType) const |
| Returns the first spell that was found in the inventory with the given tag. Returns nullptr if none was found. | |
| URuneSpellContainer | FindSpellWithAllSpecsOf (FGameplayTagContainer SpellSpecs) const |
| Returns the first spell that was found in the inventory that has all of the given specs. Returns nullptr if none was found. | |
| URuneSpellContainer | FindSpellWithAnySpecOf (FGameplayTagContainer SpellSpecs) const |
| Returns the first spell that was found in the inventory that has any of the given specs. Returns nullptr if none was found. | |
| TSet< UWeaponMeleeDefinition > | GetAllMeleeWeapons () const |
| Returns a list of all kinds of melee weapons that are inside this inventory. | |
| TSet< UWeaponArcheryDefinition > | GetAllRangedWeapons () const |
| Returns a list of all kinds of ranged weapons that are inside this inventory. | |
| TSet< UWeaponDefinition > | GetAllWeapons () const |
| Returns a list of all kinds of weapons that are inside this inventory. | |
| UArmorDefinition | GetEquippedArmor () const |
| Returns the armor the character has equipped. | |
| FGameplayTag | GetEquippedArmorType () const |
| Returns the type tag of the armor the character has equipped. Empty tag if the character has no melee weapon equipped. | |
| UArmorVisualsDefinition | GetEquippedArmorVisualsDefinition () const |
| Returns the visuals definition of the worn Armor. May be null. | |
| void | AddItemOfClass (TSubclassOf< UItemDefinition > ItemClass, int Count=1) |
| Adds items of the given type to the main inventory container. | |
| UItemDefinition | GetFirstEquippedItemOfClass (const TSubclassOf< UItemDefinition > ItemClass) const |
| Returns first equipped item of given class. | |
| UWeaponMeleeDefinition | GetFirstEquippedMeleeWeapon () const |
| Returns the first equipped melee weapon in slot order. | |
| UWeaponRangedDefinition | GetFirstEquippedRangedWeapon () const |
| Returns the first equipped melee weapon in slot order. | |
| TSet< UItemDefinition > | GetItems () const |
| Returns an array of all items with a count of at least 1 that are inside this inventory. | |
| TSet< UItemDefinition > | GetItemsMatchingAllSpecsOf (FGameplayTagContainer ItemTypes) const |
| Returns an array of all items matching all of the given spec tags. | |
| TSet< UItemDefinition > | GetItemsMatchingAnySpecOf (FGameplayTagContainer ItemTypes) const |
| Returns an array of all items matching at least one of the given spec tags. | |
| TSet< UItemDefinition > | GetItemsMatchingAnyTypeOf (FGameplayTagContainer ItemTypes) const |
| Returns an array of all items matching at least one of the given type that are inside this inventory. | |
| TSet< UItemDefinition > | GetItemsOfType (FGameplayTag ItemType) const |
| Returns an array of all items matching the given type that are inside this inventory. | |
| TSet< UItemDefinition > | GetItemsWithSpec (FGameplayTag ItemSpec) const |
| Returns an array of all items matching the given spec that are inside this inventory. | |
| bool | HasEquippedItemOfClass (TSubclassOf< UItemDefinition > ItemClass) const |
| Returns true if the character has any item of the given class as weapon or armor, equipped on the body. | |
| bool | HasEquippedItemOfType (FGameplayTag ItemType) const |
| Returns true if any item in the equip item slots matches the given type. | |
| bool | HasItemOfClass (TSubclassOf< UItemDefinition > ItemClass, EInventorySlotKind Inventory=EInventorySlotKind ::BasicInventory) const |
| Returns true if the given item is somewhere in the inventory. | |
| bool | HasItemOfType (FGameplayTag ItemType) const |
| Returns true if any item in the inventory matches the given type. | |
| bool | HasItemOfTypeInAnyGivenSlot (const TSubclassOf< UItemDefinition > ItemClass, TArray< EInventoryTypes > InventoryTypes) const |
| Returns true if any item in any given slot matches the given type. | |
| bool | HasItemOfTypeInSlot (const TSubclassOf< UItemDefinition > ItemClass, EInventoryTypes InventoryType) const |
| Returns true if any item in the Slot matches the given type. | |
| bool | HasTorch () const |
| Returns true if this character has a Torch in their Torch-Slot. | |
| int | RemoveAllItemsOfClass (TSubclassOf< UItemDefinition > ItemClass, EInventorySlotKind Inventory=EInventorySlotKind ::BasicInventory) |
| Removes all items of the given class from the given inventory. Returns how many items were removed in total. | |
| int | RemoveItemOfClass (TSubclassOf< UItemDefinition > ItemClass, int Count=1, EInventorySlotKind Inventory=EInventorySlotKind ::BasicInventory) |
| Removes items of the given class from the given inventory. Returns how many items were removed in total. | |
| bool | TakeOutItemOfKind (TSubclassOf< UItemDefinition > ItemKind) |
| Tries to find and take out 1 item of the given kind, does not wait for any animations. Returns true if such an item was found. | |
| bool | TakeOutTorch () |
| Tries to find and take out a torch, does not wait for any animations. Returns true if a torch was found and equipped. | |
| bool | UnequipArmor () |
| Moves any armor currently in the Armor Slot back to the MainContainer. | |
| void | UnEquipItem () const |
| Puts away the item the character is currently holding. | |
| bool | UnequipWeapons () |
| Moves any weapons (melee + ranged) back to main container. Returns true if something was unequipped. | |
| 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 UInventoryComponent | Get (const AActor Actor, FName WithName=NAME_None) |
| static UInventoryComponent | GetOrCreate (AActor Actor, FName WithName=NAME_None) |
| static UInventoryComponent | 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 FGameplayTag | EquippedArmorType |
| Returns the type tag of the armor the character has equipped. Empty tag if the character has no melee weapon equipped. | |
| const TSet< UWeaponArcheryDefinition > | AllRangedWeapons |
| Returns a list of all kinds of ranged weapons that are inside this inventory. | |
| const TSet< UWeaponDefinition > | AllWeapons |
| Returns a list of all kinds of weapons that are inside this inventory. | |
| const UArmorDefinition | EquippedArmor |
| Returns the armor the character has equipped. | |
| const TSet< UWeaponMeleeDefinition > | AllMeleeWeapons |
| Returns a list of all kinds of melee weapons that are inside this inventory. | |
| const UArmorVisualsDefinition | EquippedArmorVisualsDefinition |
| Returns the visuals definition of the worn Armor. May be null. | |
| const UWeaponMeleeDefinition | FirstEquippedMeleeWeapon |
| Returns the first equipped melee weapon in slot order. | |
| const UWeaponRangedDefinition | FirstEquippedRangedWeapon |
| Returns the first equipped melee weapon in slot order. | |
| const TSet< UItemDefinition > | Items |
| Returns an array of all items with a count of at least 1 that are inside this inventory. | |
| 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 |
Allows equipping items and looking through the inventory of a character.
| void AddItemOfClass | ( | TSubclassOf< UItemDefinition > | ItemClass, |
| int | Count = 1 ) |
Adds items of the given type to the main inventory container.
| void AddItemOfClassInventory | ( | TSubclassOf< UItemDefinition > | ItemClass, |
| int | Count = 1, | ||
| EInventoryTypes | inventory = EInventoryTypes :: MainContainer ) |
Adds items of the given type to the specific inventory container.
| bool AttachVisualItemOfKindWithoutAnimation | ( | TSubclassOf< UItemDefinition > | ItemKind, |
| EVisualCarrySlot | AttachTo = EVisualCarrySlot :: RightHand ) |
Tries to attach (visual!) item from melee slot to hand of character. Returns true if succeeded.
| bool CanEquipItemOfClass | ( | TSubclassOf< UItemDefinition > | ItemDefinitionClass | ) | const |
Returns true if the given character is strong enough to equip an item of the given class. Additionally, the Character needs to have animations for it.
| bool CarryItemOfKind | ( | TSubclassOf< UItemDefinition > | ItemKind | ) | const |
Takes out an item of the given kind to Carry by triggering the PickAndCarry ability. Returns true when the PickAndCarry ability could be triggered.
| bool ConsumeItemOfKind | ( | TSubclassOf< UItemDefinition > | ItemKind | ) |
Tries to find and consume 1 item of the given kind, does not wait for any animations. Returns true if consuming worked.
| int CountItemOfTypeInSlot | ( | const TSubclassOf< UItemDefinition > | ItemClass, |
| EInventoryTypes | InventoryType ) const |
Returns how many items of the in the given slot match the given type.
| int CountItemsOfClass | ( | TSubclassOf< UItemDefinition > | ItemClass, |
| EInventorySlotKind | Inventory = EInventorySlotKind :: BasicInventory ) const |
Returns how many items of the given class are in the given inventory.
| int CountItemsOfType | ( | FGameplayTag | ItemType | ) | const |
Returns how many items of the in the inventory match the given type.
|
static |
| bool DetachVisualItemOfKindWithoutAnimation | ( | TSubclassOf< UItemDefinition > | ItemKind | ) |
Tries to detach (visual!) item from hand of character to melee slot. Returns true if succeeded.
| bool EquipArmor | ( | UArmorDefinition | Armor | ) |
Moves the given armor into the armor equip slot. Does not check whether we can actually wear the armor.
The item must be somewhere in the inventory. Returns false if the armor could not be equipped.
| bool EquipArmorOfClass | ( | TSubclassOf< UArmorDefinition > | Armor | ) |
Moves a armor of the given class into the matching equip slot. Does not check whether we can actually wear the armor. If multiple armors match the given class, chooses the first it encounters.
The item must be somewhere in the inventory. Returns false if the armor could not be equipped.
| bool EquipItem | ( | EInventoryTypes | Type, |
| int | Slot ) |
Takes out/draws the item that is currently in the given type of inventory/slot. Does not wait for any animations. Returns true if an item was found.
| bool EquipMeleeWeapon | ( | UWeaponMeleeDefinition | Weapon | ) |
Moves the given weapon into the melee equip slot. Does not draw the weapon. Does not check whether we can actually hold the weapon.
The item must be somewhere in the inventory. Returns false if the weapon could not be equipped.
| bool EquipMeleeWeaponOfClass | ( | TSubclassOf< UWeaponMeleeDefinition > | Weapon | ) |
Moves a weapon of the given class into the melee equip slot. Does not draw the weapon. Does not check whether we can actually hold the weapon. If multiple weapons match the given class, chooses the first it encounters.
The item must be somewhere in the inventory. Returns false if the weapon could not be equipped.
| bool EquipRangedWeapon | ( | UWeaponArcheryDefinition | Weapon | ) |
Moves the given weapon into the ranged equip slot. Does not draw the weapon. Does not check whether we can actually hold the weapon.
The item must be somewhere in the inventory. Returns false if the weapon could not be equipped.
| bool EquipRangedWeaponOfClass | ( | TSubclassOf< UWeaponArcheryDefinition > | Weapon | ) |
Moves a weapon of the given class into the ranged equip slot. Does not draw the weapon. Does not check whether we can actually hold the weapon. If multiple weapons match the given class, chooses the first it encounters.
The item must be somewhere in the inventory. Returns false if the weapon could not be equipped.
| bool EquipWeaponOfClass | ( | TSubclassOf< UWeaponDefinition > | Weapon | ) |
Moves a weapon of the given class into the matching equip slot. Does not draw the weapon. Does not check whether we can actually hold the weapon. If multiple weapons match the given class, chooses the first it encounters.
The item must be somewhere in the inventory. Returns false if the weapon could not be equipped.
| URuneSpellContainer FindSpellOfType | ( | FGameplayTag | SpellItemType | ) | const |
Returns the first spell that was found in the inventory with the given tag. Returns nullptr if none was found.
| URuneSpellContainer FindSpellWithAllSpecsOf | ( | FGameplayTagContainer | SpellSpecs | ) | const |
Returns the first spell that was found in the inventory that has all of the given specs. Returns nullptr if none was found.
| URuneSpellContainer FindSpellWithAnySpecOf | ( | FGameplayTagContainer | SpellSpecs | ) | const |
Returns the first spell that was found in the inventory that has any of the given specs. Returns nullptr if none was found.
|
static |
| TSet< UWeaponMeleeDefinition > GetAllMeleeWeapons | ( | ) | const |
Returns a list of all kinds of melee weapons that are inside this inventory.
| TSet< UWeaponArcheryDefinition > GetAllRangedWeapons | ( | ) | const |
Returns a list of all kinds of ranged weapons that are inside this inventory.
| TSet< UWeaponDefinition > GetAllWeapons | ( | ) | const |
Returns a list of all kinds of weapons that are inside this inventory.
| UArmorDefinition GetEquippedArmor | ( | ) | const |
Returns the armor the character has equipped.
| FGameplayTag GetEquippedArmorType | ( | ) | const |
Returns the type tag of the armor the character has equipped. Empty tag if the character has no melee weapon equipped.
| UArmorVisualsDefinition GetEquippedArmorVisualsDefinition | ( | ) | const |
Returns the visuals definition of the worn Armor. May be null.
| TSet< UItemDefinition > GetEquippedItemsOfClass | ( | TSubclassOf< UItemDefinition > | ItemClass | ) | const |
Returns a set of equipped items matching the given type that are inside this inventory.
| UItemDefinition GetFirstEquippedItemOfClass | ( | const TSubclassOf< UItemDefinition > | ItemClass | ) | const |
Returns first equipped item of given class.
| UWeaponMeleeDefinition GetFirstEquippedMeleeWeapon | ( | ) | const |
Returns the first equipped melee weapon in slot order.
| UWeaponRangedDefinition GetFirstEquippedRangedWeapon | ( | ) | const |
Returns the first equipped melee weapon in slot order.
| TSet< UItemDefinition > GetItems | ( | ) | const |
Returns an array of all items with a count of at least 1 that are inside this inventory.
| TSet< UItemDefinition > GetItemsMatchingAllSpecsOf | ( | FGameplayTagContainer | ItemTypes | ) | const |
Returns an array of all items matching all of the given spec tags.
| TSet< UItemDefinition > GetItemsMatchingAnySpecOf | ( | FGameplayTagContainer | ItemTypes | ) | const |
Returns an array of all items matching at least one of the given spec tags.
| TSet< UItemDefinition > GetItemsMatchingAnyTypeOf | ( | FGameplayTagContainer | ItemTypes | ) | const |
Returns an array of all items matching at least one of the given type that are inside this inventory.
| TSet< UItemDefinition > GetItemsOfType | ( | FGameplayTag | ItemType | ) | const |
Returns an array of all items matching the given type that are inside this inventory.
| TSet< UItemDefinition > GetItemsWithSpec | ( | FGameplayTag | ItemSpec | ) | const |
Returns an array of all items matching the given spec that are inside this inventory.
|
static |
| bool HasEquippedItemOfClass | ( | TSubclassOf< UItemDefinition > | ItemClass | ) | const |
Returns true if the character has any item of the given class as weapon or armor, equipped on the body.
| bool HasEquippedItemOfType | ( | FGameplayTag | ItemType | ) | const |
Returns true if any item in the equip item slots matches the given type.
| bool HasItemOfClass | ( | TSubclassOf< UItemDefinition > | ItemClass, |
| EInventorySlotKind | Inventory = EInventorySlotKind :: BasicInventory ) const |
Returns true if the given item is somewhere in the inventory.
| bool HasItemOfType | ( | FGameplayTag | ItemType | ) | const |
Returns true if any item in the inventory matches the given type.
| bool HasItemOfTypeInAnyGivenSlot | ( | const TSubclassOf< UItemDefinition > | ItemClass, |
| TArray< EInventoryTypes > | InventoryTypes ) const |
Returns true if any item in any given slot matches the given type.
| bool HasItemOfTypeInSlot | ( | const TSubclassOf< UItemDefinition > | ItemClass, |
| EInventoryTypes | InventoryType ) const |
Returns true if any item in the Slot matches the given type.
| bool HasTorch | ( | ) | const |
Returns true if this character has a Torch in their Torch-Slot.
| int RemoveAllItemsOfClass | ( | TSubclassOf< UItemDefinition > | ItemClass, |
| EInventorySlotKind | Inventory = EInventorySlotKind :: BasicInventory ) |
Removes all items of the given class from the given inventory. Returns how many items were removed in total.
| int RemoveItemOfClass | ( | TSubclassOf< UItemDefinition > | ItemClass, |
| int | Count = 1, | ||
| EInventorySlotKind | Inventory = EInventorySlotKind :: BasicInventory ) |
Removes items of the given class from the given inventory. Returns how many items were removed in total.
|
static |
| bool TakeOutItemOfKind | ( | TSubclassOf< UItemDefinition > | ItemKind | ) |
Tries to find and take out 1 item of the given kind, does not wait for any animations. Returns true if such an item was found.
| bool TakeOutTorch | ( | ) |
Tries to find and take out a torch, does not wait for any animations. Returns true if a torch was found and equipped.
| bool UnequipArmor | ( | ) |
Moves any armor currently in the Armor Slot back to the MainContainer.
| void UnEquipItem | ( | ) | const |
Puts away the item the character is currently holding.
| bool UnequipWeapons | ( | ) |
Moves any weapons (melee + ranged) back to main container. Returns true if something was unequipped.
| const TSet<UWeaponMeleeDefinition> AllMeleeWeapons |
Returns a list of all kinds of melee weapons that are inside this inventory.
| const TSet<UWeaponArcheryDefinition> AllRangedWeapons |
Returns a list of all kinds of ranged weapons that are inside this inventory.
| const TSet<UWeaponDefinition> AllWeapons |
Returns a list of all kinds of weapons that are inside this inventory.
| const UArmorDefinition EquippedArmor |
Returns the armor the character has equipped.
| const FGameplayTag EquippedArmorType |
Returns the type tag of the armor the character has equipped. Empty tag if the character has no melee weapon equipped.
| const UArmorVisualsDefinition EquippedArmorVisualsDefinition |
Returns the visuals definition of the worn Armor. May be null.
| const UWeaponMeleeDefinition FirstEquippedMeleeWeapon |
Returns the first equipped melee weapon in slot order.
| const UWeaponRangedDefinition FirstEquippedRangedWeapon |
Returns the first equipped melee weapon in slot order.
| const TSet<UItemDefinition> Items |
Returns an array of all items with a count of at least 1 that are inside this inventory.