I am encountering what appears to be a bug when using the “Increment parameter” command type. I have a loop region which I have given a condition to only loop when a parameter called “LoopRemaining” is bigger than 0. Then I have a command instrument within the loop which is meant to decrease that parameter by 1 each time it is triggered. I have set the command instrument to have a “Delta Value” of -1 but each time it is triggered I can see that the parameter is in fact decreased by 2. I have also recreated this in a brand new project with nothing else but a 2D timeline containing a single loop region, a command instrument and the parameter as described above so I don’t think it’s anything else in my project that is causing it.
If I set the “Delta Value” to -2 it appears to result in -3 so it’s off by one when negative. If I set the “Delta Value” to 1 instead it seems to increment correctly. But then I lose the ability to set the allowed number of loops in advance by setting the parameter from code before starting the event. I guess I could also just build all my logic around the idea that -1 means -2 in practice, but that seems pretty silly and error prone.
Am I misunderstanding something about how this should work or is this a bug? I can provide a recreation project if needed, but it is easy to recreate based on what I described.
FMOD Studio version: 2.02.03, 64-bit, Build #120077
OS: Windows 10 21H2, build 19044.1526