killkhergit
Squire
This code gives weapons area damage:
But, there's two problems:
- It won't damage your team, but it will damage other friendlies, how can I fix that?
- If used on throwable weapons, it will only measure the distance from the player to the enemy. So: how can I get the position where the weapon hits the ground / follow the flying object?
No, this script isn't copyrighted, copylefted, or copymiddled. If you want to use it in mods (non-private), ask me via PM.
Code:
[(ti_on_weapon_attack,
[(get_player_agent_no, ":player_agent"),
(agent_get_team,":player_team", ":player_agent"),
(agent_get_position,pos1,":player_agent"),
(try_for_agents,":agent"),
(agent_is_alive,":agent"),
#(agent_is_human,":agent"),
(neq,":agent",":player_agent"),
(agent_get_team,":team",":agent"),
(neq,":team",":player_team"),
(agent_get_position,pos2,":agent"),
(get_distance_between_positions,":dist",pos1,pos2),
(lt,":dist",1500),
(particle_system_burst,"psys_game_blood_1",pos2,100),
(particle_system_burst,"psys_boemfik",pos2,100),
(agent_play_sound,":agent","snd_man_die"),
(agent_play_sound,":agent","snd_boem"),
(store_agent_hit_points, ":cur_hit_points",":agent",1),
(val_sub,":cur_hit_points",25),
(agent_set_hit_points,":agent",":cur_hit_points",1),
(agent_deliver_damage_to_agent,":player_agent",":agent"),
(try_end),
])]],
But, there's two problems:
- It won't damage your team, but it will damage other friendlies, how can I fix that?
- If used on throwable weapons, it will only measure the distance from the player to the enemy. So: how can I get the position where the weapon hits the ground / follow the flying object?
No, this script isn't copyrighted, copylefted, or copymiddled. If you want to use it in mods (non-private), ask me via PM.