hello i have a 2d battle royale and would like to optimize it by having set chest locations , but i want custom lootpools so i need to detect when a chest type is being opened
unfortunately i cant find anything regarding chest instances in the Dev. Docs.
does anyone have an idea and maybe a part of code since iam not really familiar with verse thx
Right now there is only one type of chest you can detect using Verse: the Hero Chest which is inside the “Chest & Ammo Gallery” of your devices folder.
You can subscribe to its “OpenEvent” using verse and then use its Rank (from C, B, A, or S) to define the loot to grant (can use the function “GetRankAsString” and compare it you the corresponding letter).
If you need more than four (the max number of pools based on chest’s ranks) lootpools you can use Gameplay Tags to identify each chest and their corresponding lootpools. Here you have the documentation to do that: Verse Tags in Verse | Fortnite Documentation | Epic Developer Community
To reference that chest in your verse code you can do it this way:
OnChestOpened(MaybeAgent : ?agent) : void =
ChestRank := MyChest.GetRankAsString()
case (ChestRank):
"C" =>
Print("You found a common chest!")
"B" =>
Print("You found a rare chest!")
"A"=>
Print("You found an epic chest!")
"S"=>
Print("You found a legendary chest!")
_=>
Print("You found a chest of unknown rarity!")
Hope this helps you! Let me know if you need more help!