一.玩家船只航行
(0, 0, 0, [(eq, "$g_player_warship_drive_mode", 1)],[(init_position, pos1),(init_position, pos2),(get_player_agent_no, ":player_agent"),(call_script, "script_get_warship_instance_no_by_index", 0),(assign, ":player_warship_instance_no", reg0),(scene_prop_get_slot, ":player_warship_move_speed", ":player_warship_instance_no", scene_prop_warship_move_speed),(prop_instance_get_position, pos1, ":player_warship_instance_no"),(store_div, ":move_y_distance", ":player_warship_move_speed", 100),(position_move_y, pos1, ":move_y_distance"),(prop_instance_set_position, ":player_warship_instance_no", pos1),(position_move_z, pos1, 200),(agent_set_position, ":player_agent", pos1),(try_for_range, ":artillery_index", 0, 10),(call_script, "script_get_warship_artillery_position", ":player_warship_instance_no", ":artillery_index"),(store_add, ":artillery_instance_no_slot", scene_prop_warship_artillery_entry_begin, ":artillery_index"),(scene_prop_get_slot, ":artillery_instance_no", ":player_warship_instance_no", ":artillery_instance_no_slot"),(prop_instance_set_position, ":artillery_instance_no", pos1),(try_end),(agent_get_look_position, pos2, ":player_agent"),(position_move_z, pos2, 100, 1),(position_move_z, pos2, 600, 0),(position_move_y, pos2, -1000, 0),(mission_cam_animate_to_position, pos2, 1, 0),]),(0, 0, 0, [(key_clicked, key_f)],[(init_position, pos1),(get_player_agent_no, ":player_agent"),(call_script, "script_get_warship_instance_no_by_index", 0),(assign, ":player_warship_instance_no", reg0),(try_begin),(eq, "$g_player_warship_drive_mode", 0),(assign, "$g_player_warship_drive_mode", 1),(agent_set_no_dynamics, ":player_agent", 1),(agent_set_animation, ":player_agent", "anim_god_man_stand_normal"),(mission_cam_set_mode, 1, 1, 0),(scene_prop_set_slot, ":player_warship_instance_no", scene_prop_warship_move_speed, 100),(scene_prop_set_slot, ":player_warship_instance_no", scene_prop_warship_rotate_speed, 10),(else_try),(assign, "$g_player_warship_drive_mode", 0),(agent_set_no_dynamics, ":player_agent", 0),(agent_set_animation, ":player_agent", "anim_god_man_stand_normal_reback"),(mission_cam_set_mode, 0, 1, 0),(scene_prop_set_slot, ":player_warship_instance_no", scene_prop_warship_move_speed, 0),(scene_prop_set_slot, ":player_warship_instance_no", scene_prop_warship_rotate_speed, 0),(try_end),]),(0, 0, 0, [(game_key_is_down, gk_move_forward),(eq, "$g_player_warship_drive_mode", 1)],[(call_script, "script_get_warship_instance_no_by_index", 0),(assign, ":player_warship_instance_no", reg0),(scene_prop_get_slot, ":player_warship_move_speed", ":player_warship_instance_no", scene_prop_warship_move_speed),(try_begin),(lt, ":player_warship_move_speed", 3000),(val_add, ":player_warship_move_speed", 10),(try_end),(scene_prop_set_slot, ":player_warship_instance_no", scene_prop_warship_move_speed, ":player_warship_move_speed"),]),(0, 0, 0, [(game_key_is_down, gk_move_backward),(eq, "$g_player_warship_drive_mode", 1)],[(call_script, "script_get_warship_instance_no_by_index", 0),(assign, ":player_warship_instance_no", reg0),(scene_prop_get_slot, ":player_warship_move_speed", ":player_warship_instance_no", scene_prop_warship_move_speed),(try_begin),(gt, ":player_warship_move_speed", 10),(val_sub, ":player_warship_move_speed", 10),(else_try),(assign, ":player_warship_move_speed", 0),(try_end),(scene_prop_set_slot, ":player_warship_instance_no", scene_prop_warship_move_speed, ":player_warship_move_speed"),]),(0, 0, 0, [(game_key_is_down, gk_move_left),(eq, "$g_player_warship_drive_mode", 1)],[(init_position, pos1),(call_script, "script_get_warship_instance_no_by_index", 0),(assign, ":player_warship_instance_no", reg0),(scene_prop_get_slot, ":player_warship_rotate_speed", ":player_warship_instance_no", scene_prop_warship_rotate_speed),(prop_instance_get_position, pos1, ":player_warship_instance_no"),(set_fixed_point_multiplier, 100),(position_rotate_z_floating, pos1, ":player_warship_rotate_speed"),(prop_instance_set_position, ":player_warship_instance_no", pos1),]),(0, 0, 0, [(game_key_is_down, gk_move_right),(eq, "$g_player_warship_drive_mode", 1)],[(init_position, pos1),(call_script, "script_get_warship_instance_no_by_index", 0),(assign, ":player_warship_instance_no", reg0),(scene_prop_get_slot, ":player_warship_rotate_speed", ":player_warship_instance_no", scene_prop_warship_rotate_speed),(prop_instance_get_position, pos1, ":player_warship_instance_no"),(set_fixed_point_multiplier, 100),(val_mul, ":player_warship_rotate_speed", -1),(position_rotate_z_floating, pos1, ":player_warship_rotate_speed"),(prop_instance_set_position, ":player_warship_instance_no", pos1),]),(ti_tab_pressed, 0, 0, [], [(finish_mission, 0),]),(ti_on_agent_spawn, 0, 0, [], [(store_trigger_param_1, ":agent_no"),(agent_set_slot, ":agent_no", slot_agent_warship_instance_no, -1),(agent_set_slot, ":agent_no", slot_agent_seat_index, -1),]),#spawn warship num 12 (ship length 4000cm + 3300cm)(ti_after_mission_start, 0, 0, [], [(get_scene_boundaries, pos6, pos7),(position_move_x, pos6, 5000),(position_move_y, pos6, 5000),(position_move_x, pos7, -5000),(position_move_y, pos7, -5000),(position_rotate_z, pos7, 180),(try_for_range, ":warship_index", 0, 6),(set_fixed_point_multiplier, 100),(position_get_z, ":z_offset", pos6),(val_mul, ":z_offset", -1),(position_move_z, pos6, ":z_offset"),(position_move_x, pos6, 10000),(set_spawn_position, pos6),(spawn_scene_prop, "spr_small_warship"),(assign, ":warship_instance_no", reg0),(assign, reg1, ":warship_index"),(display_message, "@warship index {reg1}, warship instance no {reg0}"),(scene_prop_set_slot, ":warship_instance_no", scene_prop_warship_index, ":warship_index"),(scene_prop_set_slot, ":warship_instance_no", scene_prop_warship_agent_num, 0),(scene_prop_set_slot, ":warship_instance_no", scene_prop_warship_move_speed, 0),(scene_prop_set_slot, ":warship_instance_no", scene_prop_warship_move_distance, 0),(scene_prop_set_slot, ":warship_instance_no", scene_prop_warship_rotate_speed, 0),(scene_prop_set_slot, ":warship_instance_no", scene_prop_warship_rotate_angle, 0),(store_add, ":warship_instance_no_slot", slot_seabattle_party_warship_entry_begin, ":warship_index"),(party_set_slot, "p_main_party", ":warship_instance_no_slot", ":warship_instance_no"),(try_for_range, ":artillery_index", 0, 10),(call_script, "script_get_warship_artillery_position", ":warship_instance_no", ":artillery_index"),(set_spawn_position, pos1),(spawn_scene_prop, "spr_artillery"),(assign, ":artillery_instance_no", reg0),(scene_prop_set_slot, ":artillery_instance_no", scene_prop_artillery_index, ":artillery_index"),(scene_prop_set_slot, ":artillery_instance_no", scene_prop_artillery_warship_instance_no, ":warship_instance_no"),(store_add, ":warship_artillery_instance_no_slot", ":artillery_index", scene_prop_warship_artillery_entry_begin),(scene_prop_set_slot, ":warship_instance_no", ":warship_artillery_instance_no_slot", ":artillery_instance_no"),(try_end),(try_end),(try_for_range, ":warship_index", 6, 12),(position_get_z, ":z_offset", pos7),(val_mul, ":z_offset", -1),(position_move_z, pos7, ":z_offset"),(position_move_x, pos7, 10000),(set_spawn_position, pos7),(spawn_scene_prop, "spr_small_warship"),(assign, ":warship_instance_no", reg0),(str_store_string, s1, "@zhanjian_feilong"),(prop_instance_set_material, ":warship_instance_no", -1, s1),(store_add, ":warship_instance_no_slot", slot_seabattle_party_warship_entry_begin, ":warship_index"),(party_set_slot, "p_main_party", ":warship_instance_no_slot", ":warship_instance_no"),(scene_prop_set_slot, ":warship_instance_no", scene_prop_warship_index, ":warship_index"),(scene_prop_set_slot, ":warship_instance_no", scene_prop_warship_agent_num, 0),(scene_prop_set_slot, ":warship_instance_no", scene_prop_warship_move_speed, 0),(scene_prop_set_slot, ":warship_instance_no", scene_prop_warship_move_distance, 0),(scene_prop_set_slot, ":warship_instance_no", scene_prop_warship_rotate_speed, 0),(scene_prop_set_slot, ":warship_instance_no", scene_prop_warship_rotate_angle, 0),(try_for_range, ":artillery_index", 0, 10),(call_script, "script_get_warship_artillery_position", ":warship_instance_no", ":artillery_index"),(set_spawn_position, pos1),(spawn_scene_prop, "spr_artillery"),(assign, ":artillery_instance_no", reg0),(scene_prop_set_slot, ":artillery_instance_no", scene_prop_artillery_index, ":artillery_index"),(scene_prop_set_slot, ":artillery_instance_no", scene_prop_artillery_warship_instance_no, ":warship_instance_no"),(store_add, ":warship_artillery_instance_no_slot", ":artillery_index", scene_prop_warship_artillery_entry_begin),(scene_prop_set_slot, ":warship_instance_no", ":warship_artillery_instance_no_slot", ":artillery_instance_no"),(try_end),(try_end),(assign, "$g_warship_all_spawned", 1),]),#set AI below terrain agent on warship(0, 0, 0, [(eq, "$g_warship_all_spawned", 1)], [(try_for_agents, ":agent_no"),(agent_is_alive, ":agent_no"),(agent_is_non_player, ":agent_no"),(agent_slot_eq, ":agent_no", slot_agent_warship_instance_no, -1),(assign, ":warship_index_min", -1),(assign, ":warship_index_max", -1),(try_begin),(agent_is_ally, ":agent_no"),(assign, ":warship_index_min", 0),(assign, ":warship_index_max", 6),(else_try),(assign, ":warship_index_min", 6),(assign, ":warship_index_max", 12),(try_end),##assign agent to warship(try_for_range, ":warship_index", ":warship_index_min", ":warship_index_max"),(agent_get_slot, ":agent_warship_instance_no", ":agent_no", slot_agent_warship_instance_no),(call_script, "script_get_warship_instance_no_by_index", ":warship_index"),(assign, ":warship_instance_no", reg0),(eq, ":agent_warship_instance_no", -1),(neq, ":warship_instance_no", -1),(scene_prop_get_slot, ":warship_agent_num", ":warship_instance_no", scene_prop_warship_agent_num),(try_begin),(lt, ":warship_agent_num", 10),(call_script, "script_set_ai_agent_on_ship", ":warship_instance_no", ":warship_agent_num", ":agent_no"),(val_add, ":warship_agent_num", 1),(scene_prop_set_slot, ":warship_instance_no", scene_prop_warship_agent_num, ":warship_agent_num"),(try_end),(try_end),(try_end),]),#set AI agent on warship when warship move(0, 0, 0, [(eq, "$g_warship_all_spawned", 1)], [(try_for_agents, ":agent_no"),(agent_is_alive, ":agent_no"),(agent_is_non_player, ":agent_no"),(neg|agent_slot_eq, ":agent_no", slot_agent_warship_instance_no, -1),(agent_get_slot, ":warship_instance_no", ":agent_no", slot_agent_warship_instance_no),(agent_get_slot, ":agent_seat_index", ":agent_no", slot_agent_seat_index),(call_script, "script_set_ai_agent_on_ship", ":warship_instance_no", ":agent_seat_index", ":agent_no"),(try_end),]),#set player on ship(0, 0, 0, [], [(get_player_agent_no, ":player_agent"),(try_for_prop_instances, ":warship_instance_no", "spr_small_warship"),(try_begin),(scene_prop_slot_eq, ":warship_instance_no", scene_prop_warship_index, 0),(agent_slot_eq, ":player_agent", slot_agent_warship_instance_no, -1),(init_position, pos1),(prop_instance_get_position, pos1, ":warship_instance_no"),(position_move_z, pos1, 2000),(position_set_z_to_ground_level, pos1),(agent_set_position, ":player_agent", pos1),(agent_set_slot, ":player_agent", slot_agent_warship_instance_no, ":warship_instance_no"),(try_end),(try_end),]),#set AI warship position(0, 0, 0, [], [(try_for_range, ":warship_index", 1, 12),(call_script, "script_set_ai_warship_position", ":warship_index"),(try_end),]),
二.AI船只航行
#AI warship roaming(0.5, 0, 0, [(store_mission_timer_a, ":cur_time"),(gt, ":cur_time", 5),],[(try_for_range, ":warship_index", 1, 12),(call_script, "script_get_warship_instance_no_by_index", ":warship_index"),(assign, ":warship_instance_no", reg0),(scene_prop_get_slot, ":warship_move_speed", ":warship_instance_no", scene_prop_warship_move_speed),(scene_prop_get_slot, ":warship_rotate_speed", ":warship_instance_no", scene_prop_warship_rotate_speed),(try_begin),(eq, ":warship_move_speed", 0),(eq, ":warship_rotate_speed", 0),(store_random_in_range, ":ai_strategy", 0, 10),(try_begin),(gt, ":ai_strategy", 8),(assign, ":random_enemy_target_index", 0),(try_begin),(lt, ":warship_index", 6),(store_random_in_range, ":random_enemy_target_index", 6, 12),(else_try),(store_random_in_range, ":random_enemy_target_index", 0, 6),(try_end),(call_script, "script_set_ai_warship_enemy_target", ":warship_index", ":random_enemy_target_index"),(else_try),(get_scene_boundaries, pos6, pos7),(store_random_in_range, ":random_target_position_x_offset", 0, 10),(store_random_in_range, ":random_target_position_y_offset", 0, 10),(val_mul, ":random_target_position_x_offset", 6000),(val_mul, ":random_target_position_y_offset", 6000),(val_add, ":random_target_position_x_offset", 5000),(val_add, ":random_target_position_y_offset", 5000),(position_move_x, pos6, ":random_target_position_x_offset"),(position_move_y, pos6, ":random_target_position_y_offset"),(call_script, "script_set_ai_warship_target_position", ":warship_instance_no"),(try_end),(try_end),(try_end),]),#AI warship collision detect(0.1, 0, 0, [],[(try_for_range, ":warship_index", 1, 12),(call_script, "script_check_warship_collision", ":warship_index"),(try_begin),(eq, reg0, 1),#(assign, reg1, ":warship_index"),#(display_message, "@warship index {reg1}, collision rst {reg0}"),(call_script, "script_get_warship_instance_no_by_index", ":warship_index"),(scene_prop_set_slot, reg0, scene_prop_warship_move_speed, 0),(scene_prop_set_slot, reg0, scene_prop_warship_rotate_speed, 0),(try_end),(try_end),]),#AI warship artillery attack(5, 0, 0, [],[(try_for_prop_instances, ":artillery_instance_no", "spr_artillery"),(init_position, pos1),(init_position, pos2),(scene_prop_get_slot, ":warship_instance_no", ":artillery_instance_no", scene_prop_artillery_warship_instance_no),(scene_prop_get_slot, ":warship_index", ":warship_instance_no", scene_prop_warship_index),(prop_instance_get_position, pos1, ":artillery_instance_no"),(position_move_y, pos1, 550),(position_move_z, pos1, 150),(call_script, "script_ray_collision_detect", 10000),(assign, ":is_hit", reg0),(assign, ":hit_scene_prop_id", reg3),#only enemy warship attack(eq, ":is_hit", 1),(prop_instance_get_scene_prop_kind, ":spr_kind", ":hit_scene_prop_id"),(eq, ":spr_kind", "spr_small_warship"),(scene_prop_get_slot, ":hit_warship_index", ":hit_scene_prop_id", scene_prop_warship_index),(call_script, "script_is_warship_enemy", ":warship_index", ":hit_warship_index"),(eq, reg0, 1),(set_spawn_position, pos1),(spawn_scene_prop, "spr_artillery_shell"),(scene_prop_set_slot, reg0, scene_prop_is_boom, 0),(scene_prop_set_slot, reg0, scene_prop_warship_index, ":warship_index"),(particle_system_burst, "psys_pistol_smoke", pos1, 50),(try_end),]),
三.新增函数
# script_check_warship_collision# Input: warship_index# Output: reg0 0 false 1 true("check_warship_collision", [(store_script_param, ":warship_index", 1),(init_position, pos1),(init_position, pos2),(call_script, "script_get_warship_instance_no_by_index", ":warship_index"),(assign, ":cur_warship_instance_no", reg0),(try_begin),(neq, ":cur_warship_instance_no", -1),#foward check(prop_instance_get_position, pos1, ":cur_warship_instance_no"),(position_move_y, pos1, 5000),(call_script, "script_ray_collision_detect", 1000),(assign, ":is_forward_hit", reg0),#backward check(prop_instance_get_position, pos1, ":cur_warship_instance_no"),(position_rotate_z, pos1, 180),(position_move_y, pos1, 4500),(call_script, "script_ray_collision_detect", 1000),(assign, ":is_backward_hit", reg0),(try_begin),(eq, ":is_forward_hit", 0),(eq, ":is_backward_hit", 0),(assign, reg0, 0),(else_try),(assign, reg0, 1),(try_end),(try_end),]),# script_ray_collision_detect# Input: ray_position pos1, collision_threshold# Output: reg0 0 false 1 true reg3 hit scene_prop_id("ray_collision_detect", [(store_script_param, ":collision_threshold", 1),(assign, reg0, 0),(init_position, pos2),(cast_ray, ":hit_scene_prop_id", pos2, pos1),(try_begin),(neq, ":hit_scene_prop_id", -1),(get_distance_between_positions, ":ray_length", pos2, pos1),(try_begin),(lt, ":ray_length", ":collision_threshold"),(assign, reg0, 1),(try_end),(try_end),(assign, reg3, ":hit_scene_prop_id"),]),# script_set_ai_warship_target_position# Input: warship_instance_no, pos6# Output: none("set_ai_warship_target_position", [(store_script_param, ":warship_instance_no", 1),(init_position, pos1),(init_position, pos3),(try_begin),(neq, ":warship_instance_no", -1),(prop_instance_get_position, pos1, ":warship_instance_no"),(position_transform_position_to_local, pos3, pos1, pos6),(set_fixed_point_multiplier, 100),(position_get_x, ":relative_x", pos3),(position_get_y, ":relative_y", pos3),(store_atan2, ":rotate_angle_to_position", ":relative_x", ":relative_y"),(val_mul, ":rotate_angle_to_position", -1),(get_distance_between_positions, ":distance_to_position", pos1, pos6), (scene_prop_set_slot, ":warship_instance_no", scene_prop_warship_move_distance, ":distance_to_position"),(scene_prop_set_slot, ":warship_instance_no", scene_prop_warship_rotate_angle, ":rotate_angle_to_position"),(scene_prop_set_slot, ":warship_instance_no", scene_prop_warship_move_speed, 800),(scene_prop_set_slot, ":warship_instance_no", scene_prop_warship_rotate_speed, 10),(try_end),]),# script_set_ai_warship_enemy_target# Input: warship_index, enemy_warship_index# Output: none("set_ai_warship_enemy_target", [(store_script_param, ":warship_index", 1),(store_script_param, ":enemy_warship_index", 2),(init_position, pos1),(init_position, pos2),(init_position, pos3),(call_script, "script_get_warship_instance_no_by_index", ":warship_index"),(assign, ":cur_warship_instance_no", reg0),(call_script, "script_get_warship_instance_no_by_index", ":enemy_warship_index"),(assign, ":cur_enemy_warship_instance_no", reg0),(try_begin),(neq, ":cur_warship_instance_no", -1),(neq, ":cur_enemy_warship_instance_no", -1),(prop_instance_get_position, pos1, ":cur_warship_instance_no"),(prop_instance_get_position, pos2, ":cur_enemy_warship_instance_no"),(position_move_x, pos2, 3000),(position_transform_position_to_local, pos3, pos1, pos2),(set_fixed_point_multiplier, 100),(position_get_x, ":relative_x", pos3),(position_get_y, ":relative_y", pos3),(store_atan2, ":rotate_angle_to_enemy", ":relative_x", ":relative_y"),(val_mul, ":rotate_angle_to_enemy", -1),(get_distance_between_positions, ":distance_to_enemy", pos1, pos2),(val_sub, ":distance_to_enemy", 4000),(scene_prop_set_slot, ":cur_warship_instance_no", scene_prop_warship_move_distance, ":distance_to_enemy"),(scene_prop_set_slot, ":cur_warship_instance_no", scene_prop_warship_rotate_angle, ":rotate_angle_to_enemy"),(scene_prop_set_slot, ":cur_warship_instance_no", scene_prop_warship_move_speed, 2000),(scene_prop_set_slot, ":cur_warship_instance_no", scene_prop_warship_rotate_speed, 20),(try_end),]),# script_set_ai_agent_on_ship# Input: warship_instance_no, warship_agent_num, agent_no, # Output: none("set_ai_agent_on_ship", [(store_script_param, ":warship_instance_no", 1),(store_script_param, ":warship_agent_num", 2),(store_script_param, ":agent_no", 3),(call_script, "script_get_warship_seat_position", ":warship_instance_no", ":warship_agent_num"),(agent_set_position, ":agent_no", pos1),(agent_set_slot, ":agent_no", slot_agent_warship_instance_no, ":warship_instance_no"),(agent_set_slot, ":agent_no", slot_agent_seat_index, ":warship_agent_num"),(agent_set_animation, ":agent_no", "anim_god_man_stand_normal"), ]),# script_set_ai_warship_position# Input: warship_index# Output: none("set_ai_warship_position", [(store_script_param_1, ":warship_index"),(call_script, "script_get_warship_instance_no_by_index", ":warship_index"),(assign, ":warship_instance_no", reg0),(try_begin),(neq, ":warship_instance_no", -1),(scene_prop_get_slot, ":warship_move_speed", ":warship_instance_no", scene_prop_warship_move_speed),(scene_prop_get_slot, ":warship_move_distance", ":warship_instance_no", scene_prop_warship_move_distance),(scene_prop_get_slot, ":warship_rotate_angle", ":warship_instance_no", scene_prop_warship_rotate_angle),(scene_prop_get_slot, ":warship_rotate_abs_angle", ":warship_instance_no", scene_prop_warship_rotate_angle),(scene_prop_get_slot, ":warship_rotate_speed", ":warship_instance_no", scene_prop_warship_rotate_speed),(val_abs, ":warship_rotate_abs_angle"),#ai rotate first move toward second(try_begin),(le, ":warship_rotate_abs_angle", 50),(gt, ":warship_move_distance", 0),(init_position, pos1),(prop_instance_get_position, pos1, ":warship_instance_no"),(store_div, ":move_y_distance", ":warship_move_speed", 100),(position_move_y, pos1, ":move_y_distance"),(prop_instance_set_position, ":warship_instance_no", pos1),(val_sub, ":warship_move_distance", ":move_y_distance"),(scene_prop_set_slot, ":warship_instance_no", scene_prop_warship_move_distance, ":warship_move_distance"),(try_end),#ai reach destination move speed = 0(try_begin),(le, ":warship_move_distance", 0),(scene_prop_set_slot, ":warship_instance_no", scene_prop_warship_move_speed, 0),(try_end),#ai rotate direction(try_begin),(lt, ":warship_rotate_angle", 0),(val_mul, ":warship_rotate_speed", -1),(try_end),#ai rotate direction(try_begin),(gt, ":warship_rotate_abs_angle", 50),(init_position, pos1),(prop_instance_get_position, pos1, ":warship_instance_no"),(set_fixed_point_multiplier, 100),(position_rotate_z_floating, pos1, ":warship_rotate_speed"),(prop_instance_set_position, ":warship_instance_no", pos1),(val_sub, ":warship_rotate_angle", ":warship_rotate_speed"),(scene_prop_set_slot, ":warship_instance_no", scene_prop_warship_rotate_angle, ":warship_rotate_angle"),(try_end),#ai rotate finish rotate speed = 0(try_begin),(le, ":warship_rotate_abs_angle", 50),(scene_prop_set_slot, ":warship_instance_no", scene_prop_warship_rotate_speed, 0),(try_end),(try_for_range, ":artillery_index", 0, 10),(call_script, "script_get_warship_artillery_position", ":warship_instance_no", ":artillery_index"),(store_add, ":artillery_instance_no_slot", scene_prop_warship_artillery_entry_begin, ":artillery_index"),(scene_prop_get_slot, ":artillery_instance_no", ":warship_instance_no", ":artillery_instance_no_slot"),(prop_instance_set_position, ":artillery_instance_no", pos1),(try_end),(try_end),]),# script_get_warship_artillery_position# Input: warship_instance_no, artillery_index# Output: pos1("get_warship_artillery_position", [(store_script_param_1, ":warship_instance_no"),(store_script_param_2, ":artillery_index"),(init_position, pos1),(prop_instance_get_position, pos1, ":warship_instance_no"),(position_move_z, pos1, 50),(try_begin),(lt, ":artillery_index", 5),(position_move_y, pos1, -1500),(position_move_x, pos1, -700),(store_mul, ":y_offset", ":artillery_index", 1000),(position_move_y, pos1, ":y_offset"),(position_rotate_z, pos1, 90),(else_try),(position_move_y, pos1, -1500),(position_move_x, pos1, 550),(val_sub, ":artillery_index", 5),(store_mul, ":y_offset",":artillery_index", 1000),(position_move_y, pos1, ":y_offset"),(position_rotate_z, pos1, -90),(try_end),]),# script_get_warship_seat_position# Input: warship_instance_no, seat_index# Output: pos1("get_warship_seat_position", [(store_script_param_1, ":warship_instance_no"),(store_script_param_2, ":seat_index"),(init_position, pos1),(prop_instance_get_position, pos1, ":warship_instance_no"),(position_move_z, pos1, 2000),(try_begin),(lt, ":seat_index", 5),(position_move_y, pos1, -2000),(position_move_x, pos1, -450),(store_mul, ":y_offset", ":seat_index", 1000),(position_move_y, pos1, ":y_offset"),(position_rotate_z, pos1, 90),(else_try),(position_move_y, pos1, -2000),(position_move_x, pos1, 300),(val_sub, ":seat_index", 5),(store_mul, ":y_offset", ":seat_index", 1000),(position_move_y, pos1, ":y_offset"),(position_rotate_z, pos1, -90),(try_end),]),# script_get_warship_instance_no_by_index# Input: warship_index# Output: reg0 warship_instance_no("get_warship_instance_no_by_index", [(store_script_param_1, ":warship_index"),(assign, reg0, -1),(store_add, ":warship_instance_no_slot", slot_seabattle_party_warship_entry_begin, ":warship_index"),(party_get_slot, reg0, "p_main_party", ":warship_instance_no_slot"),]),# script_is_warship_enemy# Input: warship_index, enemy_warship_index# Output: reg0 0 false 1 true("is_warship_enemy", [(store_script_param_1, ":warship_index"),(store_script_param_2, ":enemy_warship_index"),(assign, reg0, 0),(try_begin),(lt, ":warship_index", 6),(ge, ":enemy_warship_index", 6),(assign, reg0, 1),(try_end),(try_begin),(ge, ":warship_index", 6),(lt, ":enemy_warship_index", 6),(assign, reg0, 1),(try_end),]),