骑砍战团MOD开发(45)-卡拉迪亚无敌舰队称霸海上

一.玩家船只航行

      (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),]),

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/691815.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

基于芯驰 X9HP PTG4.1 在 yocto 中添加 Linux 应用

1.参考例程并添加应用 1.1 参考例程 (1)查看自带的串口测试例程 uart_test ,查看 bb 文件怎么写的。 1.2 添加 printf-test 应用 (1)在 yocto/meta-semidrive/recipes-bsp/ 目录中 copy 自带例程 uart-test 改名为 …

java中容易被忽视的toString()方法

之前一直认为toString就是将数据转换成字符类型,直到最近写出了一个bug才对toString有了新的认识 不同数据类型,toString() 有不同的操作 定义一个student类,包含姓名 String类型、性别 String类型、年龄 int 类型、分数列表 String类型的li…

2024年机器人技术的五大发展趋势,你有看好的吗?

文 BFT机器人 前言: 近些年来机器人技术作为推动社会发展的重要动力之一,它的发展成为重点关注对象,这一领域经历了漫长的发展。随着计算机、传感器和人工智能等技术的进步,现代机器人已经从简单的工具变成了各行各业的生产力。从…

9、使用 ChatGPT 的 GPT 制作自己的 GPT!

使用 ChatGPT 的 GPT 制作自己的 GPT! 想用自己的 GPT 超越 GPT ChatGPT 吗?那么让我们 GPT GPT 吧! 山姆 奥特曼利用这个机会在推特上宣传 GPTs 的同时还猛烈抨击了埃隆的格罗克。 GPTs概览 他们来了! 在上周刚刚宣布之后,OpenAI 现在推出了其雄心勃勃的新 ChatGPT…

信奥一本通:1075:药房管理

这个题可能有点误解,看这个实例,不是用30依次去减10 5 20 6 7 8,如果按照这个减法,30先减10再减5就剩15了,那完全不够后面20减的,所以次数还剩4次。但是,这道题是谁能减就减谁,意思就…

使用云渲染要注意什么?渲染100邀请码1a12

云渲染是利用云服务器进行渲染的方法,它能节省用户成本,提高效率,如果要用云渲染需要注意以下几点: 1、选择专业平台 一个专业的平台对渲染非常重要,比如渲染100,它是国内知名的云渲染提供商,拥…

【力扣 - 二叉树的中序遍历】

题目描述 给定一个二叉树的根节点 root &#xff0c;返回 它的 中序 遍历 。 提示&#xff1a; 树中节点数目在范围 [0, 100] 内 -100 < Node.val < 100方法一&#xff1a;递归 思路与算法 首先我们需要了解什么是二叉树的中序遍历&#xff1a;按照访问左子树——…

Linux小程序--进度条

目录 1.知识补充 1.1回车和换行 1.2缓冲区 2.实现倒计时 3.实现进度条 1.知识补充 1.在制作小程序进度条之前&#xff0c;我们先了解一下&#xff0c;回车换行和行缓冲区的概念。 2.动态效果&#xff0c;在同一个位置刷新不同的图像&#xff0c;实现一个倒计时的效果。…

2024最新软件测试面试题(带答案)

1. 请自我介绍一下(需简单清楚的表述自已的基本情况&#xff0c;在这过程中要展现出自信&#xff0c;对工作有激情&#xff0c;上进&#xff0c;好学) 面试官您好&#xff0c;我叫###&#xff0c;今年26岁&#xff0c;来自江西九江&#xff0c;就读专业是电子商务&#xff0c;毕…

2024年华为OD机试真题- 求字符串中所有整数的最小和-Java-OD统一考试(C卷)

题目描述: 输入字符串s,输出s中包含所有整数的最小和 说明 1. 字符串s,只包含 a-z A-Z +- ; 2. 合法的整数包括 1) 正整数 一个或者多个0-9组成,如 0 2 3 002 102 2)负整数 负号 - 开头,数字部分由一个或者多个0-9组成,如 -0 -012 -23 -00023 输入描述: 包含…

Linux 磁盘分区、挂载

Linux 磁盘分区、挂载 Linux 分区 介绍 Linux 来说无论有几个分区&#xff0c;分给哪一目录使用&#xff0c;它归根结底就只有一个根目录&#xff0c;一个独立且唯一的文件结构 , Linux 中每个分区都是用来组成整个文件系统的一部分。 Linux 采用了一种叫“载入”的处理方法&…

(十四)devops持续集成开发——jenkins流水线使用pipeline方式发布项目

前言 本节内容我们使用另外一种方式pipeline实现项目的流水线部署发布&#xff0c;Jenkins Pipeline是一种允许以代码方式定义持续集成和持续交付流水线的工具。通过Jenkins Pipeline&#xff0c;可以将整个项目的构建、测试和部署过程以脚本的形式写入Jenkinsfile中&#xff…

爬虫02-python爬虫使用的库及详解

文章目录 1 Urllib库的基本使用① 基本url请求② 查看http请求的响应信息③ 另一个请求方法&#xff1a;Request④ Handler 处理请求和响应 & Cookie 存储用户信息⑤ 异常处理⑥ url解析 2 Requests库的基本使用① 模块的简单使用② requests模块的各种请求方式③ 请求④ 响…

打通全渠道,聚道云助力时尚巨头提升运营效能

客户介绍&#xff1a; 北京某时尚有限公司是一家集设计、生产、销售于一体的时尚产业领军企业。自成立以来&#xff0c;该公司一直秉承着对时尚的独特理解和不懈追求&#xff0c;以打造高品质、高品位的时尚产品为己任&#xff0c;深受国内外消费者的喜爱。 客户痛点&#xff…

springcloud:1.Eureka详细讲解

Eureka 是 Netflix 开源的一个服务注册和发现工具,被广泛应用于微服务架构中。作为微服务架构中的核心组件之一,Eureka 提供了服务注册、发现和失效剔除等功能,帮助构建弹性、高可用的分布式系统。在现代软件开发领域,使用 Eureka 可以有效地管理和监控服务实例,实现服务之…

网络安全综合实验

1.实验拓扑 在这里注意因为第四个要求配置双击热备&#xff0c;我们可以第一时间配置&#xff0c;避免二次重复配置消耗时间 4、FW1和FW3组成主备模式的双机热备 具体配置位置在系统-->高可靠性-->双机热备-->配置 这里上行链路有两组&#xff0c;分别为电信和移动&…

Sora后观察:AI大模型产业落地的八个锚点

在正在进行的2024年&#xff0c;国内大模型也将更下沉和落地&#xff0c;在技术上的突破之外&#xff0c;也会出现更多的向下的产业兼容和产业实践案例&#xff0c;作为新质生产力推动产业数字化转型的航船加速前进。 作者|斗斗 编辑|皮爷 出品|产业家 “电影讲述了一名…

期权无风险套利策略[2]—牛市垂直价差套利

牛市垂直价差 牛市垂直价差可以分为牛市看涨期权价差策略与牛市看跌期权价差策略。 其中&#xff0c;牛市看涨价差策略是指投资者买入较低行权价的认购期权、同时卖出数量较高行权价的同月认购期权。 牛市看跌价差策略同理&#xff0c;将看涨期权换成看跌期权即可。 牛市价…

分布式id实战

目录 常用方式 特征 潜在问题 信息安全 高性能 UUID 雪花算法 数据库生成 美团Leaf方案 Leaf-segment 数据库方案 Leaf-snowflake 方案 常用方式 uuid雪花算法数据库主键 特征 全局唯一趋势递增信息安全 潜在问题 信息安全 如果id连续递增, 容易被爬虫, 批量下…

Numba原子操作和期权蒙特卡洛估值

期权的蒙特卡洛法估值的一般步骤是 1&#xff0c;生成大量标的价格路径&#xff0c;这一步是通用的&#xff0c;对所有的期权都是一样的 2&#xff0c;根据价格路径计算到期日期权的价值&#xff0c;这一步根据期权类型的不同 3&#xff0c;求所有路径下期权价值贴现的期望。这…