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!