- 好友
- 15
- 在线时间
- 142 小时
- 最后登录
- 2024-11-17
男爵[离任版主]
- UID
- 2837123
- 第纳尔
- 6789
- 精华
- 3
- 互助
- 32
- 荣誉
- 33
- 贡献
- 135
- 魅力
- 120
- 注册时间
- 2017-5-23
鲜花( 105) 鸡蛋( 1)
|
如题,我照着战团代码改了一个简易骑射触发器,但是进入场景后人一多30秒以后就会崩溃,本人百思不得其解。有没有大神帮忙指点一下
(1, 0, 0, [],
[
(set_fixed_point_multiplier, 100),
(try_for_agents, ":agent_no"),
(agent_is_active, ":agent_no"),
(agent_is_human, ":agent_no"),
(agent_get_troop_id, ":var_1", ":agent_no"),
#(is_between, ":var_1", "trp_quick_battle_troop_1", "trp_quick_battle_troops_end"),
(is_between, ":var_1", "trp_khergit_horseman", "trp_khergit_lancer"),
(agent_get_simple_behavior, ":reg1", ":agent_no"),
(eq, ":reg1", 6),
(try_begin),
(agent_ai_get_look_target, ":target", ":agent_no"),
(gt, ":target", -1),
(agent_get_position, pos2, ":agent_no"),
(agent_get_bone_position, pos5, ":target", 8, 1),
(copy_position, pos1, pos5),
(position_is_behind_position, pos2, pos1),
(get_sq_distance_between_positions, ":dist", pos1, pos2),
(try_begin),
(lt, ":dist", 40000), #20 meters
(agent_get_bone_position, pos5, ":target", 8, 1),
(copy_position, pos1, pos5),
(position_move_z, pos1, 10),
(init_position, pos3),
(position_set_x, pos3, -160), #1.6 meters
(position_transform_position_to_parent, pos4, pos1, pos3),
(copy_position, pos1, pos4),
(agent_set_look_target_position, ":agent_no", pos1),
(lt, ":dist", 22500), #15 meters
(agent_set_attack_action, ":agent_no", 0),
(try_end),
(try_end),
#(set_spawn_position,pos1),
#(spawn_scene_prop, "spr_stone_ball"),
#(display_message, "str_reg1"),
(try_end),
]),
|
|
|