This is the delay before the shot. Like character aiming.
It is implemented in the game for units and turrets with animation before spitting.
Two actions are performed: 1) start warmup - stop moving and start animation; 2) end warmup - check for the presence of a target in the spitting area, then a shot.
What is implemented for the character
Two actions are performed: 1) start warmup - ammunition is spent for a shot and the selected weapon is remembered; 2) end warmup - a check is made: the selected weapon is the same, the target is in the shot zone, a shot is fired.
Between steps 1 and 2, a character can do anything:
- Move at normal speed.
- Сhoose another weapon and choose another one of the same.
- Throw the weapon to the ground and then equip it again.
- Sit in a tank or wagon and fire a shot while sitting in it.
1) property like movement_slow_down_factor, only for warmup_state of character.
2) any visual display of warmup_state of character.
3) warmup_state cancellation when player changing weapons, on_player_gun_inventory_changed, on_player_ammo_inventory_changed, on_player_driving_changed_state.
4) You need to remove the charge of ammo when firing, and not when you start aiming.