- 好友
- 1
- 在线时间
- 41 小时
- 最后登录
- 2020-6-21
扈从
- UID
- 2790595
- 第纳尔
- 226
- 精华
- 0
- 互助
- 4
- 荣誉
- 0
- 贡献
- 0
- 魅力
- 0
- 注册时间
- 2016-12-31
鲜花( 0) 鸡蛋( 0)
|
楼主 |
发表于 2020-2-29 00:37:46
|
显示全部楼层
代码是写好了也没编译错误,但是有点小问题我的代码是添加在mt里边的village_center最后面:红色部分是我添加的代码,紫色的部分是我写的关于设置NPC17刷入到当前场景的测试可以刷出npc但是不能走。我尝试修改触发器检查时间的那部分发现也不行,后来我又尝试把紫色的那段代码放到game_menus.py里的“village_center”执行体部分编译后发现npc17可以走了。但是这会导致每个村子都会刷出这个npc,请问为什么会出现这种情况。另外我把紫色的那段代码改成“set_visitor”也不能解决这个问题。
(
"village_center",0,-1,
"village center",
[(0,mtef_scene_source|mtef_team_0,0,0,1,[]),
(1,mtef_scene_source|mtef_team_0,0,0,1,[]),
(2,mtef_scene_source|mtef_team_0,af_override_horse,0,1,[]),
(3,mtef_scene_source|mtef_team_0,af_override_horse,0,1,[]),
(4,mtef_scene_source|mtef_team_0,af_override_horse,0,1,[]),
(5,mtef_scene_source|mtef_team_0,af_override_horse,0,1,[]),
(6,mtef_visitor_source,af_override_horse,0,1,[]),
(7,mtef_scene_source|mtef_team_0,af_override_horse,0,1,[]),
(8,mtef_visitor_source,af_override_horse,0,1,[]),
(9,mtef_visitor_source,af_override_horse,0,1,[]),(10,mtef_visitor_source,af_override_horse,0,1,[]),(11,mtef_visitor_source,af_override_horse,0,1,[]),(12,mtef_visitor_source,af_override_horse,0,1,[]),(13,mtef_visitor_source,0,0,1,[]),(14,mtef_visitor_source,0,0,1,[]),(15,mtef_visitor_source,0,0,1,[]),
(16,mtef_visitor_source,af_override_horse,0,1,[]),(17,mtef_visitor_source,af_override_horse,0,1,[]),(18,mtef_visitor_source,af_override_horse,0,1,[]),(19,mtef_visitor_source,af_override_horse,0,1,[]),(20,mtef_visitor_source,af_override_horse,0,1,[]),(21,mtef_visitor_source,af_override_horse,0,1,[]),(22,mtef_visitor_source,af_override_horse,0,1,[]),(23,mtef_visitor_source,af_override_horse,0,1,[]),
(24,mtef_visitor_source,af_override_horse,0,1,[]),(25,mtef_visitor_source,af_override_horse,0,1,[]),(26,mtef_visitor_source,af_override_horse,0,1,[]),(27,mtef_visitor_source,af_override_horse,0,1,[]),(28,mtef_visitor_source,af_override_horse,0,1,[]),(29,mtef_visitor_source,af_override_horse,0,1,[]),(30,mtef_visitor_source,af_override_horse,0,1,[]),(31,mtef_visitor_source,af_override_horse,0,1,[]),
(32,mtef_visitor_source,af_override_horse,0,1,[]),(33,mtef_visitor_source,af_override_horse,0,1,[]),(34,mtef_visitor_source,af_override_horse,0,1,[]),(35,mtef_visitor_source,af_override_horse,0,1,[]),(36,mtef_visitor_source,af_override_horse,0,1,[]),(37,mtef_visitor_source,af_override_horse,0,1,[]),(38,mtef_visitor_source,af_override_horse,0,1,[]),(39,mtef_visitor_source,af_override_horse,0,1,[]),
(40,mtef_visitor_source,af_override_horse,0,1,[]),(41,mtef_visitor_source,af_override_horse,0,1,[]),(42,mtef_visitor_source,af_override_horse,0,1,[]),(43,mtef_visitor_source,af_override_horse,0,1,[]),(44,mtef_visitor_source,af_override_horse,0,1,[]),(45,mtef_visitor_source,af_override_horse,0,1,[]),(46,mtef_visitor_source,af_override_horse,0,1,[]),(47,mtef_visitor_source,af_override_horse,0,1,[]),
#(99,mtef_visitor_source,af_override_horse,0,1,[]),
],
[
(1, 0, ti_once, [], [
(store_current_scene, ":cur_scene"),#存储当前场景
(scene_set_slot, ":cur_scene", slot_scene_visited, 1),
(call_script, "script_init_town_walker_agents"),
(call_script, "script_music_set_situation_with_culture", mtf_sit_travel),
]),
(ti_before_mission_start, 0, 0, [], [(call_script, "script_change_banners_and_chest")]),
(ti_inventory_key_pressed, 0, 0, [(set_trigger_result,1)], []),
(ti_tab_pressed, 0, 0, [(try_begin),
(check_quest_active, "qst_hunt_down_fugitive"),
(neg|check_quest_succeeded, "qst_hunt_down_fugitive"),
(neg|check_quest_failed, "qst_hunt_down_fugitive"),
(quest_slot_eq, "qst_hunt_down_fugitive", slot_quest_current_state, 1),
(try_begin),
(call_script, "script_cf_troop_agent_is_alive", "trp_fugitive"),
(call_script, "script_fail_quest", "qst_hunt_down_fugitive"),
(else_try),
(call_script, "script_succeed_quest", "qst_hunt_down_fugitive"),
(try_end),
(try_end),
(set_trigger_result,1)], []),
(ti_on_leave_area, 0, 0, [
(try_begin),
(assign,"$g_leave_town",1),
(try_end),
], []),
(3, 0, 0, [(call_script, "script_tick_town_walkers")], []),
(2, 0, 0, [(call_script, "script_center_ambiance_sounds")], []),
(1, 0, ti_once, [(check_quest_active, "qst_hunt_down_fugitive"),
(neg|check_quest_succeeded, "qst_hunt_down_fugitive"),
(neg|check_quest_failed, "qst_hunt_down_fugitive"),
(quest_slot_eq, "qst_hunt_down_fugitive", slot_quest_current_state, 1),
(assign, ":not_alive", 0),
(try_begin),
(call_script, "script_cf_troop_agent_is_alive", "trp_fugitive"),
(else_try),
(assign, ":not_alive", 1),
(try_end),
(this_or_next|main_hero_fallen),
(eq, ":not_alive", 1),
],
[(try_begin),
(main_hero_fallen),
(jump_to_menu, "mnu_village_hunt_down_fugitive_defeated"),
(call_script, "script_fail_quest", "qst_hunt_down_fugitive"),
(finish_mission, 4),
(else_try),
(call_script, "script_change_player_relation_with_center", "$current_town", -2),
(call_script, "script_succeed_quest", "qst_hunt_down_fugitive"),
(try_end),
]),
(ti_after_mission_start,0,0,[
(store_current_scene,":get_scene"),
(check_quest_active,"qst_jibai_quest"),
(eq,":get_scene","scn_village_49"),
],[
(add_visitors_to_current_scene,6,"trp_npc17",1),
(try_begin),
(try_for_agents,":get_npc17"),
(agent_get_troop_id,":cur_agent_npc17",":get_npc17"),
(eq,":cur_agent_npc17","trp_npc17"),
(assign,reg33,":get_npc17"),
(init_position,pos52),
(entry_point_get_position, pos52, 99),
(agent_set_scripted_destination, reg33, pos52,0),
(agent_set_speed_limit, reg33, 5),
(try_end),
(try_end),
]),
],
),
|
|