Einskaldir said:SonKidd said:you need 'neck shots'.
you can try to increase the range and test it again.
(is_between, ":distance", 140, 185),
If it works, it means your coding is OK, then you can reduce the values again. If it still doesn't work then it's something else.
Thanks for the tip SonKidd. I modified those values to (is_between, ":distance", 90, 185), but nothing happens. Maybe I'm very bad aiming at the neck. By the way, trying to understand what I'm doing, I'd like to know what the numbers in the code are, specially that ones:
->(ge, ":damage", 30), # i'm guess that is the minimum amount of damage.
->(val_sub, ":hp", 5), # That one I really don't have a clue. Is the minimum HP what the victim must have? Or what?
Also, here is the code as is in the file:
Code:common_battle_mission_start = ( ti_before_mission_start, 0, 0, [], [ (team_set_relation, 0, 2, 1), (team_set_relation, 1, 3, 1), (call_script, "script_change_banners_and_chest"), ]) theoris_decapitation = ( ti_on_agent_hit, 0, 0, [], [ (store_trigger_param_1, ":agent"), (agent_is_human, ":agent"), (store_trigger_param_3, ":damage"), (ge, ":damage", 30), #strong blow (store_agent_hit_points, ":hp", ":agent", 1), (val_sub, ":hp", 5), (ge, ":damage", ":hp"), (agent_get_position, pos1, ":agent"), (get_distance_between_positions, ":distance", pos1, pos0), (is_between, ":distance", 90, 185), # *zing* (agent_get_item_slot, ":item", ":agent", 4), #head slot (try_begin), (ge, ":item", 1), (agent_unequip_item, ":agent", ":item"), (try_end), (agent_equip_item, ":agent", "itm_invisible_head"), (particle_system_burst, "psys_game_blood_2", pos0, 125), #Yeah.. #(set_spawn_position, pos1), #(spawn_scene_prop, "spr_physics_head"), ]), common_battle_tab_press = ( ti_tab_pressed, 0, 0, [], [ (try_begin), (eq, "$g_battle_won", 1), (call_script, "script_count_mission_casualties_from_agents"), (finish_mission,0), (else_try), (call_script, "script_cf_check_enemies_nearby"), (question_box,"str_do_you_want_to_retreat"), (else_try), (display_message,"str_can_not_retreat"), (try_end), ])
Cheers.
Did you add a reference to "theoris_decapitation" for each needed mission_template, i.e., "lead_charge"?
(ge, ":damage", 30), - If the damage is greater than or equal to 30.
(val_sub, ":hp", 5), -
(store_agent_hit_points, ":hp", ":agent", 1), => Stores agent hp to :hp
(val_sub, ":hp", 5), => Subtracts 5 from :hp (hp = hp -5)
(ge, ":damage", ":hp"), => If ( damage >= hp) (after hp - 5) (ie if damage >= hp-5)
Not sure what it's used for though... maybe it should be val_add??