骑砍1战团mod开发-呼延灼连环铁骑踏平卡拉迪亚大陆_哔哩哔哩_bilibili?
一.铁骑初始化
(0, 0, ti_once, [],[
(try_for_agents, ":agent_no"),
(agent_get_troop_id, ":agent_troop_id", ":agent_no"),
(agent_get_horse, ":agent_horse", ":agent_no"),
(try_begin),
(eq, ":agent_troop_id", "trp_god_song_guard"),
(agent_set_no_dynamics, ":agent_no", 1),
(try_begin),
(neq, ":agent_horse", -1),
(agent_set_no_dynamics, ":agent_horse", 1),
(try_end),
(try_end),
(try_begin),
(eq, ":agent_troop_id", "trp_god_song_guard_back"),
(agent_set_no_dynamics, ":agent_no", 1),
(try_end),
(try_end),
(call_script, "script_spawn_horse_guard_chain"),
]),
#refresh horse
(0, 0, 0, [], [
(init_position, pos3),
(get_player_agent_no, ":player_agent"),
(agent_get_horse, ":player_horse", ":player_agent"),
(neq, ":player_horse", -1),
(agent_get_position, pos3, ":player_horse"),
(agent_get_position, pos9, ":player_horse"),
(assign, ":index", 0),
(try_for_agents, ":agent_no"),
(agent_get_troop_id, ":agent_troop_id", ":agent_no"),
(try_begin),
(neg|agent_is_human, ":agent_no"),
(eq, ":agent_troop_id", "trp_god_song_guard"),
(try_begin),
(lt, ":index", 2),
(position_move_x, pos3, 150 , 0),
(agent_set_position, ":agent_no", pos3),
(else_try),
(lt, ":index", 4),
(try_begin),
(eq, ":index", 2),
(position_move_x, pos3, -750 , 0),
(try_end),
(position_move_x, pos3, 150 , 0),
(agent_set_position, ":agent_no", pos3),
(else_try),
(lt, ":index", 6),
(try_begin),
(eq, ":index", 4),
(position_move_x, pos3, 150 , 0),
(position_move_y, pos3, -900 , 0),
(try_end),
(position_move_y, pos3, 300 , 0),
(agent_set_position, ":agent_no", pos3),
(else_try),
(lt, ":index", 10),
(try_begin),
(eq, ":index", 6),
(position_move_y, pos3, 300 , 0),
(try_end),
(position_move_y, pos3, 300 , 0),
(agent_set_position, ":agent_no", pos3),
(try_end),
(val_add, ":index", 1),
(else_try),
(eq, ":agent_troop_id", "trp_god_song_guard_back"),
(position_move_y, pos9, -50 , 0),
(position_move_z, pos9, 30 , 0),
(agent_set_position, ":agent_no", pos9),
(agent_set_animation, ":agent_no", "anim_god_horse_man_sit_down"),
(try_end),
(try_end),
]),
二.锁链初始化
# spawn_horse_guard_chain
# Input: none
# Output: none
("spawn_horse_guard_chain", [
(init_position, pos1),
(get_player_agent_no, ":player_agent"),
(agent_get_horse, ":player_horse", ":player_agent"),
(agent_get_position, pos1, ":player_horse"),
(neq, ":player_horse", -1),
(try_for_range, ":index", 0, 10),
(spawn_scene_prop, "spr_chain_2m"),
(try_end),
]),
# refresh_horse_guard_chain
# Input: none
# Output: none
("refresh_horse_guard_chain", [
(init_position, pos4),
(get_player_agent_no, ":player_agent"),
(agent_get_horse, ":player_horse", ":player_agent"),
(neq, ":player_horse", -1),
(agent_get_position, pos4, ":player_horse"),
(position_move_z, pos4, 150, 0),
(assign, ":index", 0),
(try_for_prop_instances, ":instance_no", "spr_chain_2m"),
(try_begin),
(lt, ":index", 4),
(try_begin),
(eq, ":index", 0),
(position_move_x, pos4, -300, 0),
(try_end),
(position_move_x, pos4, 100, 0),
(init_position, pos5),
(position_copy_origin, pos5, pos4),
(position_copy_rotation, pos5, pos4),
(position_rotate_y, pos5, 90),
(prop_instance_set_position, ":instance_no", pos5),
(else_try),
(lt, ":index", 10),
(try_begin),
(eq, ":index", 4),
(position_move_x, pos4, -100, 0),
(position_move_y, pos4, -750, 0),
(try_end),
(position_move_y, pos4, 250, 0),
(init_position, pos5),
(position_copy_origin, pos5, pos4),
(position_copy_rotation, pos5, pos4),
(position_rotate_x, pos5, 90),
(prop_instance_set_position, ":instance_no", pos5),
(try_end),
(val_add, ":index", 1),
(try_end),
]),
三.践踏伤害
(1, 0, 0, [],[
(init_position, pos7),
(init_position, pos8),
(get_player_agent_no, ":player_agent"),
(try_for_agents, ":agent_no"),
(agent_get_troop_id, ":agent_troop_id", ":agent_no"),
(try_begin),
(agent_is_human, ":agent_no"),
(eq, ":agent_troop_id", "trp_god_song_guard"),
(agent_get_position, pos7, ":agent_no"),
(try_for_agents, ":agent_target_no"),
(neg|agent_is_ally, ":agent_target_no"),
(agent_is_alive, ":agent_target_no"),
(agent_get_position, pos8, ":agent_target_no"),
(get_distance_between_positions, ":distance", pos7, pos8),
(assign, reg1, ":distance"),
(display_message, "@ distance is {reg1}"),
(try_begin),
(lt, ":distance", 300),
(agent_deliver_damage_to_agent, ":player_agent", ":agent_target_no", 50, "itm_warhammer"),
(try_end),
(try_end),
(try_end),
(try_end),
]),