本帖最后由 杰喵喵 于 2023-8-29 08:33 编辑
一、效果概述与展示
1.按Y按键腾空进入飞行状态,飞行状态下贴近地面自动退出飞行;
2.飞行状态下,人的飞行操作与原来一样,视角对着天空前进升高飞行高度,对着地面前进降低飞行高度。骑马飞行情况下,非骑射状态下视角对着天空前进升高飞行高度,对着地面降低飞行高度;骑射状态下不改变飞行高度,其余操作与地面控制一样。
3.目前还不会编写AI,使用游戏自带AI加状态机与数据校正,具体细节看代码吧,骑射使用了君悦的AI,完整代码请看附件。
效果展示:
https://www.bilibili.com/video/BV1C14y1C7QU/
特别鸣谢:nimoadna(《大冒险家》)的指导与解答。
二、关键概念
1.Position rotation
# Position rotation determines just that - rotation around corresponding
# world axis. So rotation around Z axis means rotation around vertical axis,
# in other words - turning right and left. Rotation around X and Y axis will
# tilt the position forward/backwards and right/left respectively.
简单来说,agent的Position默认Y轴是前进后,X轴左右移动,Z轴上下移动,Position rotation就是沿着这些轴旋转。
2.场景道具销毁
似乎没有绝对消除的办法,我这里使用场景隐身与关闭物理来解决。 (prop_instance_enable_physics,":borad",0),#关闭碰撞体 (scene_prop_set_visibility,":borad",0), #关闭显示
3.使用与下次飞行位置的Z轴-1垂直点,通过 position_set_z_to_ground_level 来用于是否接触地面判断。因为玩家始终在托板上面,使用玩家位置点来position_get_distance_to_ground_level 始终大于等于0。具体实现看下面程序。
3.position_get_distance_to_terrain,pos对地形的距离负数表示在地形之下,正数在地形之上。
4.城墙或者其他场景上降落使用
(cast_ray, <destination>, <hit_position_register>, <ray_position_register>, [<ray_length_fixed_point>]),
强制转换一条长度为[<ray_length_fixed_point>]的射线,从<ray_position_register>开始,并将最近的命中位置存储到<hit_position_register>中(如果没有命中则失败)。如果body hit是一个prop实例,它的id将被存储到<destination>中。
简单来说就是将agent的位置点往下移动,绕X轴旋转 90度,然后发射判断线,如果有碰撞到非踏板的其他场景单位,则取消飞行。
5.退出飞行直接将踏板埋在底下。
三、代码
slot_agent_fly 飞行状态标志位
slot_agent_fly_borad 存储飞行道具的ID
my_prop_set_visibility 为常数0
玩家部分:
使用场景道具辅助飞行学习笔记
https://bbs.mountblade.com.cn/thread-2100606-1-1.html
(出处: 骑马与砍杀中文站论坛)
其他agent部分:
module_mission_templates
- #自己写的垃圾飞行AI,专门只是用近战步兵并且遭遇战专用 lead_charge
- common_agent_flying_lead_charge = (0, 0, 0, [],
- [
- #设置pos单位量尺为cm
- (set_fixed_point_multiplier, 100),
-
- (try_for_agents, ":agent_no"),
- (agent_is_non_player,":agent_no"),
- (agent_is_human, ":agent_no"), ##是人
- (agent_is_alive, ":agent_no"), ##存活的
- (neg|agent_is_wounded,":agent_no"),##非击晕的
- (agent_get_troop_id,":troop_id",":agent_no"),
- (agent_get_horse,":horse", ":agent_no"),
- (agent_get_team,":agent_team",":agent_no"),
- (agent_get_division, ":agent_division", ":agent_no"),
- (team_get_movement_order, ":movement_order", ":agent_team", ":agent_division"),
-
- (assign,":agent_use_range",0),
- (try_begin),
- (call_script, "script_cf_agent_use_range_weapon",":agent_no"),
- (assign,":agent_use_range",1),
- (try_end),
-
- (assign,":agent_can_fly",0),
- (try_begin),
- (gt,":horse",-1),
- (agent_get_item_id,":item_id",":horse"),
- (eq,":item_id","itm_courser_fly"),
- (assign,":agent_can_fly",1),
- (else_try),
- (this_or_next|eq,":troop_id","trp_nord_champion_fly"),#需要设定的单位
- (eq,":troop_id","trp_swadian_sharpshooter_fly"),
- (assign,":agent_can_fly",1),
- (try_end),
- (eq,":agent_can_fly",1),
- (agent_get_slot,":borad",":agent_no",slot_agent_fly_borad),
- (agent_ai_get_move_target,":target_agent",":agent_no"),
-
- (assign,":distance_target",5000),
- (try_begin),
- (gt,":target_agent",-1),
- (init_position,pos20),
- (agent_get_position, pos20, ":agent_no"),
- (init_position,pos21),
- (agent_get_position, pos21, ":target_agent"),
- (position_get_distance_to_terrain,":terrain_agent_no",pos20),
- (position_get_distance_to_terrain,":terrain_target_agent",pos21),
- (position_set_z,pos20,0),
- (position_set_z,pos21,0),
- (get_distance_between_positions,":distance_target",pos20,pos21),
-
- (try_end),
- (assign,":distance_target_judgment",200),
- (assign,":terrain_judgment",100),
- (try_begin),
- (gt,":horse",-1),
- (init_position,pos20),
- (agent_get_speed,pos20,":horse"),
- (assign,":var_0",":horse"),
- (assign,":distance_target_judgment",1500),
- (assign,":terrain_judgment",50),
- (else_try),
- (init_position,pos20),
- (agent_get_speed,pos20,":agent_no"),
- (assign,":var_0",":agent_no"),
- (assign,":distance_target_judgment",200),
- (assign,":terrain_judgment",100),
- (try_end),
- (try_begin),#开始产生床
- (agent_slot_eq,":agent_no",slot_agent_fly,0),
- (agent_get_slot,":borad",":agent_no",slot_agent_fly_borad),
- (le,":borad",0),
- (init_position,pos10),
- (agent_get_position, pos10, ":agent_no"),
-
- (try_begin),
- (eq,"$g_battle_in_storm_a_city",0),
- (position_move_z,pos10,1000),
- (else_try),
- (position_move_z,pos10,2000),
- (try_end),
- #产生床
- (set_spawn_position, pos10),
- (try_begin),
- (gt,":horse",-1),
- (spawn_scene_prop, "spr_bed_a_new"),
- (else_try),
- (spawn_scene_prop, "spr_pillow_a_new"),
- (try_end),
- (assign,":borad",reg0),
- (agent_set_slot,":agent_no",slot_agent_fly_borad,":borad"),
- (prop_instance_enable_physics,":borad",1),#碰撞体
- (scene_prop_set_visibility,":borad",my_prop_set_visibility), #显示
- #给马设定飞行托板仅仅是为了马死亡的时候将托板埋于地下,控制飞行的时候不需要
- (try_begin),
- (gt,":horse",-1),
- (agent_set_slot,":horse",slot_agent_fly_borad,":borad"),
- (try_end),
-
- (agent_set_slot,":agent_no",slot_agent_fly,1),
- (agent_set_position, ":var_0", pos10),
- (else_try),#正常飞行
- (agent_slot_eq,":agent_no",slot_agent_fly,1),
-
- (agent_get_slot,":borad",":agent_no",slot_agent_fly_borad),
- (gt,":borad",0),
- (prop_instance_enable_physics,":borad",1),#碰撞体
-
- (assign,":y_move",0),
- (assign,":x_move",0),
- (assign,":z_move",0),
-
- (position_get_y,":y_speed",pos20),
- (position_get_x,":x_speed",pos20),
- (prop_instance_get_position, pos20, ":borad"),
- (prop_instance_get_position, pos22, ":borad"),
- (init_position,pos21),
- (agent_get_look_position, pos21, ":agent_no"),
- (try_begin),
- (gt,":horse",-1),
- (position_get_rotation_around_x,":rotation_x",pos21),
-
- (val_div,":y_speed",70),
- (assign,":y_move",":y_speed"),
- (val_div,":x_speed",70),
- (assign,":x_move",":x_speed"),
-
- (agent_get_animation,":animation",":horse",1),
- (try_begin),
- (eq|this_or_next,":animation","anim_horse_turn_right"),
- (eq,":animation","anim_horse_turn_right_head"),
- (position_rotate_z, pos20, -1),
- (else_try),
- (eq|this_or_next,":animation","anim_horse_turn_left"),
- (eq,":animation","anim_horse_turn_left_head"),
- (position_rotate_z, pos20, 1),
- (try_end),
-
- #Z轴限制保护防止,角度过大出问题
- (assign,":forced_descent",0),
- (try_begin),
- (is_between,":rotation_x",1,91),#鼠标移动玩家视角向上 对着天空
- (store_div,":value", ":rotation_x",9),
- (val_add,":value",1),
- (store_div,":z_move",":y_speed",20),
- (val_mul,":z_move",":value"),
- (try_begin),
- (ge,":terrain_target_agent",":terrain_agent_no"),
- (val_add,":z_move",4),
- (try_end),
- (else_try),
- (is_between,":rotation_x",270,360),#鼠标移动玩家视角向下 对着地面
- (neq,":movement_order",mordr_hold),
- (store_sub,":value", 360,":rotation_x"),
- (store_div,":value", ":value",9),
- (val_add,":value",4),
- (val_mul,":value",-1),
- (store_div,":z_move",":y_speed",20),
- (val_mul,":z_move",":value"),
-
- (gt,":target_agent",-1),
- (call_script,"script_cf_agent_is_no_fly",":target_agent"),
- (try_begin),
- (ge,":terrain_target_agent",":terrain_agent_no"),
- (val_mul,":z_move",-1),
- (val_add,":z_move",4),
- (else_try),
- #检查是否为远程单位,远程单位不下降飞行高度
- (eq,":agent_use_range",1),
- (assign,":z_move",0),
- (else_try),
- (lt,":distance_target",":distance_target_judgment"),
- (val_add,":z_move",-4),
- (assign,":forced_descent",1),
- (try_end),
- (else_try),
- (eq,":rotation_x",0),
- (gt,":y_move",0),
- (assign,":z_move",0),
- (gt,":target_agent",-1),
- (call_script,"script_cf_agent_is_no_fly",":target_agent"),
-
- (try_begin),
- (ge,":terrain_target_agent",":terrain_agent_no"),
- (val_add,":z_move",4),
- (else_try),
- (eq,":agent_use_range",0),#不使用远程武器
- (lt,":distance_target",":distance_target_judgment"),
- (val_add,":z_move",-4),
- (assign,":forced_descent",1),
- (try_end),
-
- (try_end),
-
- #防止使用武器的时候Z轴上下移动,保证骑射水平移动
- (try_begin),
- (eq,":forced_descent",0),
- (agent_get_attack_action, ":attack_action", ":agent_no"),#Retrieves agent's current attack action. Possible values: free = 0, readying_attack = 1, releasing_attack = 2, completing_attack_after_hit = 3, attack_parried = 4, reloading = 5, after_release = 6, cancelling_attack = 7.
- (agent_get_defend_action, ":defend_action", ":agent_no"),#Retrieves agent's current defend action. Possible values: free = 0, parrying = 1, blocking = 2.
- (neq|this_or_next, ":attack_action",0),
- (neq, ":defend_action",0),
- (assign,":z_move",0),
- (try_end),
- (else_try),
- (position_copy_rotation,pos20,pos21),
- (position_get_rotation_around_x,":rotation_x",pos21),
- (val_div,":y_speed",20),
- (assign,":y_move",":y_speed"),
- (val_div,":x_speed",20),
- (assign,":x_move",":x_speed"),
-
- #Z轴限制保护防止,角度过大出问题
- (try_begin),
- (is_between,":rotation_x",1,91),#鼠标移动玩家视角向上 对着天空
- (try_begin),
- (gt,":rotation_x",45),
- (store_sub,":angle_x",":rotation_x",45),
- (val_mul,":angle_x",-1),
- (position_rotate_x,pos20,":angle_x"),
- (assign,":z_move",0),
- (try_end),
- (else_try),
- (is_between,":rotation_x",270,360),#鼠标移动玩家视角向下 对着地面
- (try_begin),
- (lt,":rotation_x",315),
- (store_sub,":angle_x",315,":rotation_x"),
- (position_rotate_x,pos20,":angle_x"),
- (assign,":z_move",-1),
- (gt,":target_agent",-1),
- (call_script,"script_cf_agent_is_no_fly",":target_agent"),
- (lt,":distance_target",":distance_target_judgment"),
- (assign,":z_move",-3),
- (try_end),
- (else_try),
- (gt,":y_move",0),
- (eq,":rotation_x",0),
- (assign,":z_move",0),
- (gt,":target_agent",-1),
- (call_script,"script_cf_agent_is_no_fly",":target_agent"),
- (ge,":terrain_target_agent",":terrain_agent_no"),
- (val_add,":z_move",4),
- (try_end),
- (try_end),
-
- (position_move_y, pos20, ":y_move"),
- (position_move_x, pos20, ":x_move"),
- (position_move_z, pos20, ":z_move"),
-
- #获得地图最大限制
- (init_position,pos26),
- (init_position,pos27),
- (get_scene_boundaries, pos26, pos27),#左下角和右上角的点,方向朝上
- (position_get_x, ":lower_left_corner_x", pos26),
- (position_get_y, ":lower_left_corner_y", pos26),
- (position_get_x, ":upper_right_corner_x", pos27),
- (position_get_y, ":upper_right_corner_y", pos27),
- (val_add,":lower_left_corner_x",300),
- (val_add,":lower_left_corner_y",300),
- (val_sub,":upper_right_corner_x",300),
- (val_sub,":upper_right_corner_y",300),
-
- (position_get_distance_to_terrain,":terrain",pos20),
- (position_get_x,":pos_x",pos20),
- (position_get_y,":pos_y",pos20),
- #确保玩家在地图限制范围内移动,,判断障碍点玩家之间拥有视野
- (try_begin),#正常飞行
- (le|this_or_next,":pos_x",":lower_left_corner_x"),
- (le,":pos_y",":lower_left_corner_y"),
-
- (try_begin),
- (agent_slot_eq|this_or_next, ":agent_no", slot_agent_is_running_away, 1),#逃跑
- (eq,":movement_order",mordr_retreat),
- (agent_fade_out,":agent_no"),
- (position_set_z,pos20,-500),
- (prop_instance_set_position, ":borad", pos20),
- (else_try),
- (copy_position,pos20,pos22),
- (agent_force_rethink,":agent_no"),
- (position_move_y,pos22,-500),
- (position_rotate_z, pos22, 100),
- (agent_set_scripted_destination, ":agent_no", pos22, 1),
- (try_end),
-
- (else_try),
- (ge|this_or_next,":pos_x",":upper_right_corner_x"),
- (ge,":pos_y",":upper_right_corner_y"),
-
- (try_begin),
- (agent_slot_eq|this_or_next, ":agent_no", slot_agent_is_running_away, 1),#逃跑
- (eq,":movement_order",mordr_retreat),
- (agent_fade_out,":agent_no"),
- (position_set_z,pos20,-500),
- (prop_instance_set_position, ":borad", pos20),
- (else_try),
- (copy_position,pos20,pos22),
- (agent_force_rethink,":agent_no"),
- (position_move_y,pos22,-500),
- (position_rotate_z, pos22, 100),
- (agent_set_scripted_destination, ":agent_no", pos22, 1),
- (try_end),
-
- (else_try), #主要针对野战情况下,退出飞行模式
- (le, ":terrain", ":terrain_judgment"),
- (agent_set_slot,":agent_no",slot_agent_fly,2),
- (prop_instance_enable_physics,":borad",0),#关闭碰撞体
- (else_try),
- (init_position,pos23),
- (init_position,pos28),
- (agent_get_position,pos23,":var_0"),
- (position_move_z,pos23,-20),
- (position_rotate_x,pos23,90),
- #(cast_ray, <destination>, <hit_position_register>, <ray_position_register>, [<ray_length_fixed_point>]),
- #强制转换一条长度为[<ray_length_fixed_point>]的射线,从<ray_position_register>开始,并将最近的命中位置存储到<hit_position_register>中(如果没有命中则失败)。如果body hit是一个prop实例,它的id将被存储到<destination>中。
- (cast_ray,":prop_id",pos28,pos23,20),
- (gt,":prop_id",-1),
- (prop_instance_get_scene_prop_kind,":prop_kind",":prop_id"),
- (neq,":prop_kind","spr_bed_a_new"),
- (neq,":prop_kind","spr_pillow_a_new"),
- (position_copy_rotation,pos28,pos20),
- (copy_position,pos20,pos28),
- (prop_instance_enable_physics,":borad",0),#关闭碰撞体
- (agent_set_slot,":agent_no",slot_agent_fly,2),#退出飞行
- (try_end),
-
- #设置障碍判断pos25
- (init_position,pos25),
- (copy_position,pos25,pos20),
- (try_begin),
- (gt,":horse",-1),
- (position_move_z, pos25, 300),
- (position_move_y, pos25, 200),
- (else_try),
- (position_move_z, pos25, 150),
- (position_move_y, pos25, 100),
- (try_end),
-
- (try_begin),
- (neg|agent_is_in_line_of_sight,":agent_no",pos25),
- (position_move_z, pos20, 5),
- (position_rotate_z,pos20,1),
- #(agent_force_rethink, ":agent_no"),
- (try_end),
-
- (prop_instance_set_position, ":borad", pos20),
- (prop_instance_get_position, pos20, ":borad"),#场景物的坐标,实时获取
- (agent_set_position, ":var_0", pos20),
-
- (try_begin),
- (agent_slot_eq,":agent_no",slot_agent_fly,2),
- (position_set_z,pos20,-500),
- (prop_instance_set_position, ":borad", pos20),
- (try_end),
-
- (else_try),#非飞行状态
- (agent_slot_eq,":agent_no",slot_agent_fly,2),
- (agent_get_slot,":borad",":agent_no",slot_agent_fly_borad),
- (gt,":borad",0),
- (gt,":target_agent",-1),
- (eq,":movement_order",mordr_charge),
- (init_position,pos20),
- (agent_get_position, pos20, ":agent_no"),
- (try_begin),
- (gt,":horse",-1),
- (assign,":var_0",":horse"),
- (position_move_z,pos20,50),
- (assign,":distance_target_judgment",2000),
- (else_try),
- (assign,":var_0",":agent_no"),
- (position_move_z,pos20,35),
- (assign,":distance_target_judgment",1000),
- (try_end),
-
- (assign,":agent_restart_fly",0),
- (try_begin),
- (call_script,"script_cf_agent_is_fly",":target_agent"),
- (assign,":agent_restart_fly",1),
- (else_try),
- (call_script,"script_cf_agent_is_no_fly",":target_agent"),
- (gt,":distance_target",":distance_target_judgment"),
- (assign,":agent_restart_fly",1),
- (try_end),
-
- (eq,":agent_restart_fly",1),
- #限制角度保护 X Y 轴rotation
- (position_get_rotation_around_x, ":rotation_x", pos20),
- (position_get_rotation_around_y, ":rotation_y", pos20),
-
- (try_begin),
- (gt,":rotation_x",0),
- (store_sub,":angle_x",":rotation_x",0),
- (val_mul,":angle_x",-1),
- (position_rotate_x,pos20,":angle_x"),
- (else_try),
- (lt,":rotation_x",360),
- (store_sub,":angle_x",360,":rotation_x"),
- (position_rotate_x,pos20,":angle_x"),
- (try_end),
-
- (try_begin),
- (gt,":rotation_y",0),
- (store_sub,":angle_y",":rotation_y",0),
- (val_mul,":angle_y",-1),
- (position_rotate_y,pos20,":angle_y"),
- (else_try),
- (lt,":rotation_y",360),
- (store_sub,":angle_y",360,":rotation_y"),
- (position_rotate_y,pos20,":angle_y"),
- (try_end),
-
- (prop_instance_enable_physics,":borad",1),#碰撞体
- (prop_instance_set_position, ":borad", pos20),
- (prop_instance_get_position, pos20, ":borad"),
- (agent_set_position, ":var_0", pos20),
- (agent_set_slot,":agent_no",slot_agent_fly,3),
- (position_get_distance_to_terrain,":terrain",pos20),
- (agent_set_slot,":agent_no",slot_agent_terrain,":terrain"),
- (else_try),#起飞状态
- (agent_slot_eq,":agent_no",slot_agent_fly,3),
- (agent_get_slot,":borad",":agent_no",slot_agent_fly_borad),
- (gt,":borad",0),
- (prop_instance_enable_physics,":borad",1),#碰撞体
- (prop_instance_get_position, pos20, ":borad"),#场景物的坐标,实时获取
- (position_get_distance_to_terrain,":terrain",pos20),
- (agent_get_slot,":terrain_judgment",":agent_no",slot_agent_terrain),
- (val_add,":terrain_judgment",500),
-
- (try_begin),
- (gt,":horse",-1),
- (assign,":var_0",":horse"),
- (else_try),
- (assign,":var_0",":agent_no"),
- (try_end),
-
- (try_begin),
- (le, ":terrain",":terrain_judgment"),
- (position_move_z,pos20,5),
- (prop_instance_set_position, ":borad", pos20),
- (prop_instance_get_position, pos20, ":borad"),
- (agent_set_position, ":var_0", pos20),
- (else_try),
- (agent_set_slot,":agent_no",slot_agent_fly,1),
- (try_end),
-
- (try_end),
- (try_end),
- ]
- )
复制代码
module_scripts部分
- #检查agent是使用远程武器
- ("cf_agent_use_range_weapon", [
- (store_script_param, ":agent_no", 1),
-
- (gt,":agent_no",-1),
- (agent_get_wielded_item, ":wielded_item", ":agent_no", 0),
- (gt,":wielded_item",0),
- (item_get_type, ":item_weapon_type", ":wielded_item"),
- (eq|this_or_next, ":item_weapon_type",itp_type_bow),
- (eq|this_or_next,":item_weapon_type",itp_type_crossbow),
- (eq|this_or_next,":item_weapon_type",itp_type_thrown),
- (eq|this_or_next,":item_weapon_type",itp_type_pistol),
- (eq,":item_weapon_type",itp_type_musket),
- ]),
-
-
- #检查agent不使用使用远程武器
- ("cf_agent_no_use_range_weapon", [
- (store_script_param, ":agent_no", 1),
-
- (gt,":agent_no",-1),
- (agent_get_wielded_item, ":wielded_item", ":agent_no", 0),
- (gt,":wielded_item",0),
- (item_get_type, ":item_weapon_type", ":wielded_item"),
- (neg, ":item_weapon_type",itp_type_bow),
- (neg,":item_weapon_type",itp_type_crossbow),
- (neg,":item_weapon_type",itp_type_thrown),
- (neg,":item_weapon_type",itp_type_pistol),
- (neg,":item_weapon_type",itp_type_musket),
- ]),
-
- #检查agent是是飞行单位
- ("cf_agent_is_fly", [
- (store_script_param, ":agent_no", 1),
-
- (gt,":agent_no",-1),
- (agent_slot_eq|this_or_next,":agent_no",slot_agent_fly,1),
- (agent_slot_eq,":agent_no",slot_agent_fly,3),
- ]),
-
- #检查agent是不是飞行单位
- ("cf_agent_is_no_fly", [
- (store_script_param, ":agent_no", 1),
-
- (gt,":agent_no",-1),
- (neg|agent_slot_eq,":agent_no",slot_agent_fly,1),
- (neg|agent_slot_eq,":agent_no",slot_agent_fly,3),
- ]),
-
- #agent退出飞行
- ("dead_agent_exit_fly", [
- (store_script_param, ":agent_no", 1),
-
- (try_begin),
- (gt,":agent_no",-1),
-
- (assign,":borad",-1),
- (try_begin),#人
- (agent_is_human,":agent_no"),
- (call_script,"script_cf_agent_is_fly",":agent_no"),
- (agent_get_slot,":borad",":agent_no",slot_agent_fly_borad),
- (agent_set_slot,":agent_no",slot_agent_fly_borad,-1),
- (agent_set_slot,":agent_no",slot_agent_fly,-1),
- (else_try),#马
- (neg|agent_is_human,":agent_no"),
- (agent_get_slot,":borad",":agent_no",slot_agent_fly_borad),
- (agent_set_slot,":agent_no",slot_agent_fly,-1),
- (try_end),
-
- (try_begin),
- (gt,":borad",0),
- (prop_instance_get_position, pos25, ":borad"),
- (position_get_z, ":pos_z", pos25),
- (ge,":pos_z",-100),
- (position_set_z,pos25,-500),
- (prop_instance_set_position, ":borad", pos25),
- (prop_instance_enable_physics,":borad",0),
- (try_end),
-
- (try_end),
- ]),
-
- #产生agent飞行坐骑
- ("fly_rider_agent_spawn",
- [
- (store_script_param, ":agent_no", 1),
- (try_begin),
- (gt,":agent_no",-1),
- (agent_get_troop_id,":troop_id",":agent_no"),
- (troop_has_item_equipped, ":troop_id", "itm_courser_fly"),
- (agent_get_horse,":cur_horse",":agent_no"),
- (le,":cur_horse",-1),
- (assign,":cur_horse_id","itm_courser_fly"),
- (init_position,pos29),
- (agent_get_position,pos29,":agent_no"),
- (set_show_messages,0),
- (set_spawn_position,pos29),
- (spawn_horse,":cur_horse_id"),
- (agent_get_team, ":team", ":agent_no"),
- (agent_get_division, ":division", ":agent_no"),
- (team_give_order, ":team", ":division", grc_heroes),
- (set_show_messages,1),
- (try_end),
-
- ]
- ),
复制代码
|