Say I'm adding some actions ["a", "b", "c", "d"] manually (hardcoded), I know the indexes by the order of addition. But if I add action "e" and "f" by two different triggers, there's no way to find out the index of these actions if I wanted to remove one of them again, unless I save them to variables. But saving every action index to an own variable is in many ways a lot of effort if you have a big mission with a lot of "addAction" statements.
So therefore it might be very useful to operate with either manually settable indexes or <b>"actionUIDs"</b>, just as the variable name used by the command "getVariable". Currently, the workaround would be an array with custom "actionUIDs":
<i>
customActionUIDs = [];
customActionUIDs set [player addAction ["Custom Action", {hint "hello, world";}], "myCustomUID"];
player removeAction (customActionUIDs find "myCustomUID");
customActionUIDs set [customActionUIDs find "myCustomUID", nil];
</i>
This works, but it's three long lines instead of just one, plus if you forget to remove the UID it from your UID array at just one position, your whole addAction system is screwed, so it's a very unstable system. Sure you can put it in a function, but the problem remains. If you forget to call your function at just one point, you're f**ked.
An SQF command (call it <i><b>"addActionUID"</b></i> if you will), where you can set the identifier yourself without a workaround:
<i>
actionUID = object addActionUID action //actionUID should be of type STRING
object removeActionUID actionUID
</i>
This would be safer and way more comfortable. And it should be able to work alongside the default "addAction" command as "addActionUID" could stores and connect UID and index internally.
I'd be very glad if you considered this request.
Best regards,
Johnny