("cf_destroy_barricade",
[(store_script_param_1, ":instance_no"),
(scene_prop_get_instance, ":barricade_object", "spr_invasion_barricade", ":instance_no"),
(ge, ":barricade_object", 0),
(prop_instance_get_position, pos1, ":barricade_object"),
(try_for_agents, ":agent_no"),
(multiplayer_is_server),
(agent_is_alive, ":agent_no"),
# (agent_is_human, ":agent_no"),
(agent_get_team, ":team_no", ":agent_no"),
(eq, ":team_no", 1),
(agent_get_position,pos2, ":agent_no"),
(get_distance_between_positions, ":dist",pos1,pos2),
(le, ":dist", 120),
(agent_set_look_target_position, ":agent_no", pos1),
(store_random_in_range, ":attack_dir", 0, 4),
(agent_set_attack_action, ":agent_no", ":attack_dir", 0), #swings at door
(scene_prop_get_hit_points, ":hitpoints", ":instance_no"),
(val_sub, ":hitpoints", 1),
(scene_prop_set_hit_points, ":instance_no", ":hitpoints"),
(try_end),
(val_add, ":instance_no", 1),
(call_script, "script_cf_destroy_barricade", ":instance_no"),
]),