1. In sbps/your_squad/squad_team_weapon_ext/in_setup_action:
Add a dummy slot_item called 'is_in_setup'.
And a dummy upgrade called 'start_moving' with a requirement that the upgrade is not present.
2. In ebps/your_gun/action_apply:
2a. Add a first requirement_action to set an animator_set_state:
state_machine_name: artillery_state
do_action_state_name: mobile
undo_action_state_name: ready
retrigger: true
The requirement_table:
Code
Any_in_list:
All_in_list:
required_slot_item 'is_in_setup', min: 0 and max: 0
required_squad_upgrade 'start_moving' is_present: true
All_in_list:
required_slot_item 'is_in_setup', min: 0 and max: 0
required_not:
required_in_state, not_moving: true
2b. Add another requirement_action:
The action:
change_target_action(squad) > remove_upgrade 'start_moving'
The requirement_table:
Code
required_squad_upgrade 'start_moving' is_present: true
required_not:
required_in_state, not_moving: true
The slot_item is automatically removed when the squad in out of setup. This implementation causes the animation to start when the gun in converting from setup to moving and keeps that way until it stopped moving.