e.g.
while {
_index < 299 && {currentWeapon _vehicle != _weapon}
} do {
_unit action ["SwitchWeapon", _vehicle, _unit, _index];
_index = _index + 1;
};
// switch to last mode
private _index = [_unit, _weapon, _mode] call EFUNC(common,getFiremodeIndex);
_unit action ["SwitchWeapon", _unit, _unit, _index];
but the original func doesn't seem to work as expected, the "rollover" never happens?
e.g.
ace_safemode
ace_respawn
ace_weaponselect
helper func https://github.com/acemod/ACE3/blob/5aac4c201aec160f861d96116a10efa2e2f10ad5/addons/common/functions/fnc_getFiremodeIndex.sqf
https://github.com/acemod/ACE3/blob/master/addons/safemode/functions/fnc_unlockSafety.sqf#L66-L72
should be able to be replaced with
but the original func doesn't seem to work as expected, the "rollover" never happens?