- 好友
- 6
- 在线时间
- 0 小时
- 最后登录
- 2024-11-13
骑士
- UID
- 3398051
- 第纳尔
- 1841
- 精华
- 0
- 互助
- 48
- 荣誉
- 5
- 贡献
- 10
- 魅力
- 341
- 注册时间
- 2022-8-13
鲜花( 57) 鸡蛋( 0)
|
本帖最后由 ggfgfgf 于 2023-6-8 13:48 编辑
一个mission_templates的触发器,斩首功能,可以正常实现,但是刷红字
At Mission Template mst_quick_battle_battle trigger no: 10 consequences. At Mission Template mst_quick_battle_battle trigger no: 10 consequences. SCRIPT WARNING ON OPCODE 1710: Invalid Agent ID: 554; LINE NO: 2:
At Mission Template mst_quick_battle_battle trigger no: 11 consequences. At Mission Template mst_quick_battle_battle trigger no: 11 consequences. SCRIPT WARNING ON OPCODE 1704: Invalid Agent ID: 554; LINE NO: 2:
At Mission Template mst_quick_battle_battle trigger no: 26 consequences. At Mission Template mst_quick_battle_battle trigger no: 26 consequences. SCRIPT WARNING ON OPCODE 545: Invalid Agent ID: 554; LINE NO: 3:
At Mission Template mst_quick_battle_battle trigger no: 26 consequences. At Mission Template mst_quick_battle_battle trigger no: 26 consequences. SCRIPT WARNING ON OPCODE 1750: Invalid Agent ID: 182; LINE NO: 53:
At Mission Template mst_quick_battle_battle trigger no: 10 consequences. At Mission Template mst_quick_battle_battle trigger no: 10 consequences. SCRIPT WARNING ON OPCODE 1710: Invalid Agent ID: 568; LINE NO: 2:
At Mission Template mst_quick_battle_battle trigger no: 11 consequences. At Mission Template mst_quick_battle_battle trigger no: 11 consequences. SCRIPT WARNING ON OPCODE 1704: Invalid Agent ID: 568; LINE NO: 2:
At Mission Template mst_quick_battle_battle trigger no: 26 consequences. At Mission Template mst_quick_battle_battle trigger no: 26 consequences. SCRIPT WARNING ON OPCODE 545: Invalid Agent ID: 568; LINE NO: 3:
At Mission Template mst_quick_battle_battle trigger no: 26 consequences. At Mission Template mst_quick_battle_battle trigger no: 26 consequences.
请教下大佬原因,鲜花附上!
cut_body = (
ti_on_agent_hit, 0, 0, [],
[
(store_trigger_param_1,":hiter"),
(store_trigger_param_2, ":agent"),
(store_trigger_param_3,":injury"),
(store_trigger_param, ":hit_bone", 4),
(copy_position,pos1,pos0),
(assign, ":attacker_item", reg0),
(agent_is_human, ":agent"),
(agent_is_non_player, ":agent"),
(try_begin),
# (eq, ":hit_bone", hb_head),#head
# (try_begin),
# (ge, ":injury", 25),
# (neq, ":attacker_item", "itm_mace_1"), ### List of weapons that cannot decapitate
# (neq, ":attacker_item", "itm_mace_2"), ### This would be easier to do with a preperty check (for damage type), but I don't know if that is possible or not
# (neq, ":attacker_item", "itm_mace_3"),
# (neq, ":attacker_item", "itm_staff"),
# (agent_get_action_dir, ":attack_dir", ":hiter"), ### Makes sure the attack is either a left or right swing
# (this_or_next|eq, ":attack_dir", 1), ### Right swing
# (eq, ":attack_dir", 2), ### Left swing
(eq,1,1),
(display_message,"@h",0x000000),
(store_agent_hit_points, ":hp", ":agent", 1),
# (is_between, ":hp", 0, 20),
(gt, ":hp", 0),
(agent_get_item_slot, ":item", ":agent", 4), #head slot
(try_begin),
(ge, ":item", 1), ### Does it?
(agent_unequip_item, ":agent", ":item"), ### Yes it does. Unequip it to allow replacement by the invisible helmet further down
(try_begin),
(assign, ":prunetime", 360),
(spawn_item, ":item", 0, ":prunetime"), ### Spawns the agent's currently equipped headgear on the dropped head's position
(try_end),
(try_end),
(agent_equip_item, ":agent", "itm_invisible_head"),
(agent_get_position, pos4, ":agent"),
(agent_get_horse, ":is_mounted", ":agent"),
(try_begin), ### If the agent is on horseback, these values are used (note that these values will not be exactly correct if the horse is very large or very small)
(ge, ":is_mounted", 0), ### Will be -1 if no horse is to be found, so anything above means that the agent is mounted
(assign, ":min_distance", 240), ### Minimum distance from the agent's horse's hooves from which the hit is valid (240 is an approximate value)
(else_try), ### If the agent is on foot, these values are used
(assign, ":min_distance", 160), ### Minimum distance from the agent's feet from which the hit is valid (160 = slightly below the neck)
(try_end),
(position_move_z, pos4, ":min_distance"),
(store_random_in_range, ":z_rotation", 0, 360),
(store_random_in_range, ":y_rotation", -60, 60),
(store_random_in_range, ":x_pos", -90, 90),
(store_random_in_range, ":y_pos", -90, 90),
(position_rotate_z, pos4,":z_rotation"),
(position_rotate_y, pos4,":y_rotation"),
(position_move_x, pos4, ":x_pos"),
(position_move_y, pos4, ":y_pos"),
(position_set_z_to_ground_level, pos4),
(position_move_z, pos4, 5),
(set_spawn_position, pos4),
### Blood effects! The last variable is the strength. Lower or increase it for more/less blood (or tweak the particle effects themselves in "module_particle_systems.py").
(particle_system_burst, "psys_blood_decapitation", pos4, 40),
(particle_system_burst, "psys_game_blood", pos4, 10),
(particle_system_burst, "psys_game_blood_2", pos4, 10),
(play_sound_at_position, "snd_decapitation", pos1),
(agent_play_sound, "snd_broken"),
(assign, ":head_type", "spr_head_dynamic_male"),
(agent_get_troop_id, ":victim_troop", ":agent"),
(try_begin),
(ge, ":victim_troop", 0),
(troop_get_type,":victim_gender",":victim_troop"),
(eq, ":victim_gender", 1),
(assign, ":head_type", "spr_head_dynamic_female"),
(try_end),
(position_move_z, pos4, 20),
(set_spawn_position, pos4),
(spawn_scene_prop, ":head_type"),
# (try_end),
# (val_mul,":injury",0.4),
(else_try),
(is_between, ":hit_bone", hb_shoulder_l, hb_hand_r + 1),# arms
(val_mul,":injury",0.2),
(else_try),
(is_between, ":hit_bone", hb_thigh_l, hb_foot_r + 1),# legs
(store_agent_hit_points,":hp",":agent",1),
(store_agent_hit_points,":hp2",":agent",0),
(try_begin),
(gt,":hp2",0),
(store_div,":now",":injury",":hp2"),
(try_begin),
(this_or_next|gt,":now",0.3),
(lt,":hp",41),
(agent_set_speed_modifier,":agent",":hp"),
(try_end),
(val_mul,":injury",0.2),
(try_end),
(try_end),
(store_agent_hit_points,":now_hp", ":agent",1),
(val_sub,":now_hp",":injury"),
(agent_set_hit_points, ":agent",":now_hp",1),
])
("head_dynamic_male",sokf_moveable|sokf_dynamic_physics,"cut_off_head_male_dynamic","bo_cut_off_head_dynamic", []),
("head_dynamic_female",sokf_moveable|sokf_dynamic_physics,"cut_off_head_female_dynamic","bo_cut_off_head_dynamic", []),
标红的问题,已解决
|
|