HK40 说:
Fearghus The Killer 说:
Ilwuen 说:
HK40 说:
#grouptest
#script_agent_reassign_aux_team
# INPUT: arg1 = agent_no
# OUTPUT: none
("agent_reassign_aux_team",
[
(store_script_param, ":agent_no", 1),
(get_player_agent_no, ":player_agent"),
(try_begin),
(ge, ":player_agent", 0),
(agent_is_human, ":agent_no"),
(agent_get_team, ":player_team", ":player_agent"),
(agent_get_team, ":agent_team", ":agent_no"),
(neq, ":agent_team", ":player_team"),
(agent_get_troop_id, ":agent_troop_id", ":agent_no"),
(eq, ":agent_troop_id", 64), #khergit skirmisher
(val_add, ":agent_team", 2),
(agent_set_team, ":agent_no", ":agent_team"),
(try_end),
# script_battle_tactic_init_aux
# Input: team_no, battle_tactic
# Output: none
("battle_tactic_init_aux",
[
(store_script_param, ":team_no", 1),
(store_script_param, ":battle_tactic", 2),
(team_get_leader, ":ai_leader", ":team_no"),
#grouptest
(assign, ":aux_team", ":team_no"),
(val_add, ":aux_team", 2),
(team_set_leader, ":aux_team", ":ai_leader"),
(team_give_order, ":aux_team", grc_everyone, mordr_hold),
(team_give_order, ":aux_team", grc_everyone, mordr_dismount),
#grouptest
(try_begin),etc.
(ti_before_mission_start, 0, 0, [],
[
(team_set_relation, 0, 2, 1),
(team_set_relation, 1, 3, 1),
#grouptest
(team_set_relation, 0, 4, 1),
(team_set_relation, 2, 4, 1),
(team_set_relation, 1, 5, 1),
(team_set_relation, 3, 5, 1),
#grouptest end
(ti_on_agent_spawn, 0, 0, [],
[
(store_trigger_param_1, ":agent_no"),
(call_script, "script_agent_reassign_team", ":agent_no"),
(call_script, "script_agent_reassign_aux_team", ":agent_no"),#grouptest
xenoargh 说:
Somebody 说:
xenoargh 说:
# script_battle_tactic_init
# Input: none
# Output: none
("battle_tactic_init",
[
(call_script, "script_battle_tactic_init_aux", "$ai_team_1", "$ai_team_1_battle_tactic"),
(try_begin),
(ge, "$ai_team_2", 0),
(call_script, "script_battle_tactic_init_aux", "$ai_team_2", "$ai_team_2_battle_tactic"),
(try_end),
#grouptest
(try_for_agents, ":cur_agent"),
(agent_get_troop_id, ":troop_id", ":cur_agent"),
(eq, ":troop_id", 64), #khergit skirmisher
(agent_set_group, ":cur_agent", 6),
(try_end),
(try_for_agents, ":cur_agent"),
(agent_get_troop_id, ":troop_id", ":cur_agent"),
(troop_get_class, ":troop_class", ":troop_id"),
(try_begin),
(eq, ":troop_class", 6),
(str_store_class_name, s1, ":troop_class"),
(display_message, "@Skirmisher found, troop class is: {s1}"),
(try_end),
(try_end),
#end grouptest
(try_for_agents, ":cur_agent"),
(agent_set_slot, ":cur_agent", slot_agent_is_running_away, 0), #initially nobody is running away.
(try_end),
]),
multi_troop_class_other = 0
multi_troop_class_infantry = 1
multi_troop_class_spearman = 2
multi_troop_class_cavalry = 3
multi_troop_class_archer = 4
multi_troop_class_crossbowman = 5
multi_troop_class_mounted_archer = 6
multi_troop_class_mounted_crossbowman = 7
(else_try),
(eq, ":troop_no", "trp_khergit_veteran_horse_archer_multiplayer"),
(assign, ":troop_class", multi_troop_class_mounted_archer),
(try_begin),
(eq, "$g_formation_group5_selected", 1),
(team_give_order, ":player_team", 5, mordr_hold),
(team_set_order_position, ":player_team", 5, pos3),
(try_end),
("battle_tactic_init_aux",
[
(store_script_param, ":team_no", 1),
(store_script_param, ":battle_tactic", 2),
(team_get_leader, ":ai_leader", ":team_no"),
(try_begin),
(eq, ":battle_tactic", btactic_hold),
(agent_get_position, pos1, ":ai_leader"),
(call_script, "script_find_high_ground_around_pos1", ":team_no", 30),
(copy_position, pos1, pos52),
(call_script, "script_find_high_ground_around_pos1", ":team_no", 30), # call again just in case we are not at peak point.
(copy_position, pos1, pos52),
(call_script, "script_find_high_ground_around_pos1", ":team_no", 30), # call again just in case we are not at peak point.
(team_give_order, ":team_no", grc_everyone, mordr_hold),
(team_set_order_position, ":team_no", grc_everyone, pos52),
(team_give_order, ":team_no", grc_archers, mordr_advance),
(team_give_order, ":team_no", grc_archers, mordr_advance),
(else_try),
(eq, ":battle_tactic", btactic_follow_leader),
(team_get_leader, ":ai_leader", ":team_no"),
(ge, ":ai_leader", 0),
(agent_set_speed_limit, ":ai_leader", 8),
(agent_get_position, pos60, ":ai_leader"),
(team_give_order, ":team_no", grc_everyone, mordr_hold),
(team_set_order_position, ":team_no", grc_everyone, pos60),
(try_end),
]),