Me again.
So I tossed that other code and picked up the one that sounded the most like what I was trying to do. In the Curtain of Fire Mod you could shoot this "crossbow" item and a wave of water would sweep the terrain killing everything in its path (like Somebody described). I figure all I have to do is make it deal damage instead of just killing and reduce the range, right?
For it to work though I think I have to use a mission template Mirathei said (in the readme) he used on all battle templates. Just copying and pasting the template doesn't seem to work though...
Here are the codes:
["wave","Wave", [("speck",0)],itp_type_crossbow |itp_unique|itp_primary|itp_bonus_against_shield ,itcf_shoot_pistol, 4938 , weight(4)|spd_rtng(89) | shoot_speed(100) | thrust_damage(25 , blunt)|max_ammo(2)|weapon_length(65),imodbits_missile,
[(ti_on_weapon_attack, [(play_sound,"snd_footstep_water"),(assign,":distance",99999),(try_for_agents,":agent"),
(agent_is_alive,":agent"),
(agent_is_human,":agent"),
(agent_get_look_position, pos2, ":agent"),
(get_distance_between_positions,":dist",pos1,pos2),
(lt,":dist",":distance"),
(assign,":chosen",":agent"),
(assign,":distance",":dist"),
(end_try),
(assign,reg55,":chosen"),
(agent_get_position,pos5,":chosen"),
(position_set_z_to_ground_level, pos5),
(position_move_y,pos5,250),],)]],
and
(0.1, 0, 0, [],[(ge,reg55,0),(particle_system_burst, "psys_tsunami", pos5, 100),
(try_for_agents,":killed"),
(agent_is_alive,":killed"),
(neg|agent_has_item_equipped,":killed","itm_black_helmet"),
(agent_get_position,pos1,":killed"),
(get_distance_between_positions,":dist",pos1,pos5),
(lt,":dist",200),
(agent_set_hit_points,":killed",0,0),
(agent_deliver_damage_to_agent,":killed",":killed"),
(end_try),
(position_move_y,pos5,80),
(position_set_z_to_ground_level,pos5),]),
(ti_before_mission_start, 0, 0, [], [(assign,reg55,-1)]),
My limited knowledge tells me the template says whenever there's a particle system burst of tsunami the "kill all in path" effect kicks in. Where does reg55 play in though?
Thoughts?