Skip to content

UTDRL_GrenadePouchComponent

Klian edited this page Nov 23, 2023 · 3 revisions

Parent: UActorComponent


This is the main component used to manage grenades for each character.

Variables

image

Icon_Int32 Limit on Classes: Limits the amount of different classes the character can carry

Icon_Array_Struct Pouch Limits: List of classes and the relative carrying limit

Functions

image

v͟o͟i͟d͟ Add Grenade to Pouch List: Add specified class and amount to this grenade pouch, any excess will be removed from the game (use in combination with CanAddGrenadeByClass if you want to manage any excess)

Icon_Bool Can Add Grenade by Class: Perform a series of checks based on the user's preferences to determine if a given class can be added, will return excess and which slot index would be used

Icon_Int32 Get Amount Grenades of Class: Return the amount of grenades for a specified class, will return 0 even if the class can't be found

Icon_Int32 Get Grenade Available Slots Count: Return the amount of slots that can be occupied by picking up new grenade classes (-1 when no limit)

Icon_Array_Int Get Grenade Pouch Amounts: Return the list of quantities for each class found in this pouch

Icon_Array_Class Get Grenade Pouch Classes: Return the list of classes found in this pouch

Icon_Int32 Get Grenade Pouch Limit by Class: Return the max amount of grenades the character can carry for a given class

Icon_Array_Struct Get Grenade Pouch List: Return the list of grenades in this pouch, includes available amount for each class

Icon_Int32 Get Grenade Slots Count: Return the amount of slots currently occupied by grenades (-1 is none)

Icon_Int32 Get Grenade Slots Index by Class: Return the grenade slot index, if found. Otherwise will return -1

Icon_Int32 Get Grenade Total Count: Return the total count of grenades in this grenade pouch

Icon_Bool Has Any Grenade of Class: Return true if the specified class can be found in this pouch

v͟o͟i͟d͟ Remove Grenades from Pouch: Will remove a certan amount of grenades from this pouch, by the specified amount

Blueprint Examples

image

image

image