You were missing the closing try end, which is likely to mess up the loop, I believeSpecialist said:Okay, jus tested it... for some reason, now it isn't delivering damage to the enemy either.
Code:
mp_slash = (0, 0, 1, [(key_clicked, key_v)],
[
(multiplayer_is_server),
# (try_begin),
(get_player_agent_no, ":player_agent"),
(agent_play_sound, ":player_agent", "snd_man_grunt"),
(agent_set_animation, ":player_agent", "anim_slash_attack"),
# (try_end), #there's no condition in there...so no need for a try block
(agent_get_position,pos1,":player_agent"),
(try_for_agents,":target"),
(neq, ":target", ":player_agent"), #### here it is
(agent_get_position,pos2,":target"),
(get_distance_between_positions,":dist",pos1,pos2),
#(try_begin),
(lt,":dist",250),
(store_agent_hit_points,":hp",":target",1),
(store_random_in_range,":dmg",30,50),
(val_sub,":hp",":dmg"),
(agent_set_hit_points,":target",":hp",1),
(le,":hp",0),
(agent_deliver_damage_to_agent,":player_agent",":target"),
#(try_end), #and since you don't do anything if the above fails, no need for a try block here either
(try_end), ##this was missing
])