How Does item_granter_device's SetNextItem Method Work?

Hey there, I was hoping that someone could check on the engineering side and explain how the method SetNextItem works on the Item Granter Device.

# Sets the next item to be granted.
#  * `Index` should be between `0` and the available item count - 1.
#  * Calling `SetNextItem` with an invalid index will do nothing.
        SetNextItem<public>(Index:int):void = external {}

I’m noticing peculiar behavior and I’m wondering where this “NextItem” is stored, and how that might impact the functionality of the device? Does this method create a new reference variable, so the method is an extension that’s kind of just tacked onto the device? It doesn’t seem to cycle because that would change the index values of the items in the device, which leads me to believe its doing something different but I’m not sure what that functionality implies in regards to equip on granted for example.

An example of what I’m referring to is the MutatorZone where GetAgentsInZone is an extension method that does a capsule trace using the MutatorZones bounding box coordinates, but doesn’t actually use the device so it can’t inherit the filter settings for agent teams or classes.

This would really help me resolve a bug in my current implementation to be able to understand how this works.

Thanks!

Thank you for your report! Can you please re-post using the “New Issue” option on the Issues and Bug Reporting forums? Posts with this feature are connected directly into our development team so we can quickly get to them!

For more information, such as how to get the reference ID, please check out the article here: Using the Creative and UEFN Bug Reporting Form