("formation_line",
[
(store_script_param,":formation_team",1),
(store_script_param,":formation_class",2),
(team_get_leader,":leader",":formation_team"),
(agent_get_position,1,":leader"),
(assign,":column",1),
(position_move_x,1,-300),
(try_for_agents,":agent"),
(neq,":agent",":leader"),
(agent_is_alive,":agent"),
(agent_is_human,":agent"),
(agent_get_team,":team",":agent"),
(eq,":team",":formation_team"),
(agent_get_class,":class",":agent"),
(eq,":class",":formation_class"),
(agent_set_scripted_destination,":agent",1),
(position_move_x,1,100),
(try_begin),
(eq,":column",10),
(position_move_x,1,-10*100),
(position_move_y,1,-100),
(assign,":column",1),
(else_try),
(val_add,":column",1),
(try_end),
(try_end),
]
),
("formation_open_line",
[
(store_script_param,":formation_team",1),
(store_script_param,":formation_class",2),
(team_get_leader,":leader",":formation_team"),
(agent_get_position,1,":leader"),
(assign,":column",1),
(position_move_x,1,-300),
(try_for_agents,":agent"),
(neq,":agent",":leader"),
(agent_is_alive,":agent"),
(agent_is_human,":agent"),
(agent_get_team,":team",":agent"),
(eq,":team",":formation_team"),
(agent_get_class,":class",":agent"),
(eq,":class",":formation_class"),
(agent_set_scripted_destination,":agent",1),
(position_move_x,1,200),
(try_begin),
(eq,":column",10),
(position_move_x,1,-10*200),
(position_move_y,1,-200),
(assign,":column",1),
(else_try),
(val_add,":column",1),
(try_end),
(try_end),
]
),
("formation_line_abreast",
[
(store_script_param,":formation_team",1),
(store_script_param,":formation_class",2),
(team_get_leader,":leader",":formation_team"),
(agent_get_position,1,":leader"),
(assign,":column",1),
(position_move_x,1,-300),
(try_for_agents,":agent"),
(neq,":agent",":leader"),
(agent_is_alive,":agent"),
(agent_is_human,":agent"),
(agent_get_team,":team",":agent"),
(eq,":team",":formation_team"),
(agent_get_class,":class",":agent"),
(eq,":class",":formation_class"),
(agent_set_scripted_destination,":agent",1),
(position_move_x,1,150),
(try_begin),
(eq,":column",20),
(position_move_x,1,-20*150),
(position_move_y,1,-150),
(assign,":column",1),
(else_try),
(val_add,":column",1),
(try_end),
(try_end),
]
),
("formation_stagger",
[
(store_script_param,":formation_team",1),
(store_script_param,":formation_class",2),
(team_get_leader,":leader",":formation_team"),
(agent_get_position,1,":leader"),
(position_move_x,1,100),
(assign,":move_y",-100),
(try_for_agents,":agent"),
(neq,":agent",":leader"),
(agent_is_alive,":agent"),
(agent_is_human,":agent"),
(agent_get_team,":team",":agent"),
(eq,":team",":formation_team"),
(agent_get_class,":class",":agent"),
(eq,":class",":formation_class"),
(agent_set_scripted_destination,":agent",1),
(position_move_x,1,100),
(position_move_y,1,":move_y"),
(val_mul,":move_y",-1),
(try_end),
]
),
("formation_wedge",
[
(store_script_param,":formation_team",1),
(store_script_param,":formation_class",2),
(team_get_leader,":leader",":formation_team"),
(agent_get_position,1,":leader"),
(assign,":column",1),
(assign,":nc",3),
(position_move_x,1,-150),
(try_for_agents,":agent"),
(neq,":agent",":leader"),
(agent_is_alive,":agent"),
(agent_is_human,":agent"),
(agent_get_team,":team",":agent"),
(eq,":team",":formation_team"),
(agent_get_class,":class",":agent"),
(eq,":class",":formation_class"),
(agent_set_scripted_destination,":agent",1),
(try_begin),
(eq,":column",":nc"),
(val_mul,":nc",-150),
(position_move_x,1,":nc"),
(position_move_y,1,-300),
(assign,":column",1),
(val_div,":nc",-150),
(val_add,":nc",2),
(else_try),
(position_move_x,1,150),
(val_add,":column",1),
(try_end),
(try_end),
]
),
("formation_end",
[
(store_script_param,":formation_team",1),
(store_script_param,":formation_class",2),
(try_for_agents,":agent"),
(agent_is_alive,":agent"),
(agent_is_human,":agent"),
(agent_get_team,":team",":agent"),
(eq,":team",":formation_team"),
(agent_get_class,":class",":agent"),
(eq,":class",":formation_class"),
(agent_clear_scripted_mode,":agent"),
(try_end),
]
),