|
楼主 |
发表于 2022-5-13 16:22:26
|
显示全部楼层
我是个新手,刚照葫芦画瓢学了几天PY,大佬我还是不懂。这是我写进PY里的,我看不出这哪出了问题,请帮我指点一下。
init_flail_head = (
0, 0, 0, [],
[
(try_for_agents,":agent_no"),
(agent_is_alive,":agent_no"),
(agent_is_human,":agent_no"),
(agent_get_wielded_item, ":item_id", ":agent_no", 0),
(eq,":item_id","itm_ba_flail"),
(try_begin),
(agent_slot_eq, ":agent_no", slot_agent_own_flail, 0),
(agent_get_position,pos1,":agent_no"),
(set_spawn_position, pos1),
(spawn_scene_prop, "spr_flail_head"),
(agent_set_slot, ":agent_no", slot_agent_own_flail, 1),
(agent_set_slot, ":agent_no", slot_agent_flail_id, reg0),
(else_try),
(agent_get_slot, ":flail_id", ":agent_no", slot_agent_flail_id),
(agent_get_bone_position, pos2, ":agent_no", 19, 1),
(agent_get_animation, ":cur_anim", ":agent_no", 1),
(position_move_y, pos2,30),
(try_begin),
(this_or_next|eq,":cur_anim","anim_release_slash_horseback_right"),
(this_or_next|eq,":cur_anim","anim_release_slash_horseback_left"),
(this_or_next|eq,":cur_anim","anim_release_slashleft_onehanded"),
(this_or_next|eq,":cur_anim","anim_release_overswing_onehanded"),
(eq,":cur_anim","anim_release_slashright_onehanded"),
(prop_instance_deform_to_time, ":flail_id", 1),
(prop_instance_animate_to_position, ":flail_id", pos2, 0),
(else_try),
(prop_instance_deform_to_time, ":flail_id", 0),
(agent_get_position,pos3,":agent_no"),
(position_copy_origin, pos3, pos2),
(position_rotate_x, pos3, -90),
(position_rotate_y, pos3, 0),
(position_rotate_z, pos3, -35),
(prop_instance_animate_to_position, ":flail_id", pos3, 0),
(try_end),
(try_end),
(try_end),
]) |
|