My latest crazy idea, make some troop typed able to heal nearby troops if enemies are far enough away... but it's doing a whole lotta nothing.
Any thoughts?
P.S. I HAVE created the slot, before anyone asks. And all those troop types DO exist.
healing_info = (
ti_on_agent_spawn, 0, 0, [],
[
(store_trigger_param_1, ":agent"),
(try_begin),
(this_or_next|eq, ":agent", "trp_healingman"),
(this_or_next|eq, ":agent", "trp_friar"),
(eq, ":agent", "trp_vorokmonk"),
(agent_set_slot, ":agent", slot_healing_rate, 1),
(try_end),
])
healing = (
3, 0, 0, [],
[
(assign, "$healing", 2),
(try_for_agents, ":agent"),
(get_player_agent_no,":player"),
(neq,":agent",":player"),
(agent_is_alive,":agent"),
(agent_get_team,":team",":agent"),
(try_for_agents,"ther"),
(agent_is_alive,"ther"),
(agent_is_human,"ther"),
(agent_get_team,"therteam","ther"),
(try_begin),
(neq,":team","therteam"),
(agent_get_position,pos2,"ther"),
(get_distance_between_positions,":dist",pos1,pos2),
(lt,":dist",1000),
(assign, "$healing", 1),
(try_end),
(eq, "$healing", 2),
(agent_get_slot, ":rate", ":agent", slot_healing_rate),
(gt,":rate",0),
(try_for_agents, ":agent_2"),
(agent_is_alive,":agent_2"),
(agent_is_human,":agent_2"),
(agent_get_position,pos3,":agent"),
(agent_get_position,pos4,":agent_2"),
(get_distance_between_positions,":dist2",pos3,pos4),
(lt,":dist2",300),
(agent_set_animation,":agent","anim_release_slashright_twohanded"),
(store_agent_hit_points, ":hp", ":agent_2", 1),
(val_add, ":hp", ":rate"),
(agent_set_hit_points, ":agent_2", ":hp", 1),
(try_end),
(try_end),
(try_end),
])
Any thoughts?
P.S. I HAVE created the slot, before anyone asks. And all those troop types DO exist.