Shotgun Sword?

Users who are viewing this thread

Status
Not open for further replies.

Berserker Pride

Grandmaster Knight
Hehe its not what it sounds like. Basically I'm wondering if there is some kind of trigger to make a weapon attack 3 or more times simultameously but only show one swing animation.  I'm trying to find a workaround for area damage with a melee weapon.  If there was a way to do that then that would cover all the problems of what agents get hit and what don't.  For example if you hit a tough enemy he might tank all three hits.  But three weak archers might all die from the one swing.  And that way only the enemies who actually got hit by the blade would die.  This might be basically impossible but it would be sweet. Maybe I'll find something in header_operations.  In gun mods do the shotguns fire multiple bullets or do they just do a cone of damage?
 
the only thing I have seen which is similar was the magic sword for the Curtains of Fire Magic Mod for 0.960.  The source code is released for that mod and I modified it for a "force kill" in my mod which can kill multiple people around you.  I've pasted my code below for reference.

Code:
# SW - concept below from Curtains of Fire - Magic Mod
["force_kill","Force Kill", [("transparent",0),("force_kill_inv", ixmesh_inventory)], itp_type_thrown|itp_merchandise|itp_primary ,itc_longsword, 
	8000 , weight(0.5)|abundance(60)|difficulty(0)|spd_rtng(90) | shoot_speed(5) | thrust_damage(100,pierce)|max_ammo(1)|weapon_length(8),imodbits_none,
	[
		(ti_on_weapon_attack, [(
								assign,":distance",99999),
                              #(particle_system_burst, "psys_game_blood", pos1, 45), #SW modified
                              #(particle_system_burst, "psys_game_blood_2", pos1, 45), #SW modified
							 (get_player_agent_no, ":player_agent"),
							 (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"),
								(agent_get_team  ,":team", ":chosen"),
							 (end_try),
                             (try_for_agents,":agent"),
								(agent_is_alive,":agent"),
								(agent_is_human,":agent"), #SW modified
								(neq, ":agent", ":player_agent"), #SW modified
								(neq,":agent",":chosen"),
								(agent_get_team  ,":team2", ":agent"),
								(neq,":team",":team2"),
								(agent_get_position, pos2, ":agent"),
								(agent_get_position,pos1,":chosen"),
								(get_distance_between_positions,":dist",pos1,pos2),
								(lt,":dist",350),
								(position_move_z,pos2,150),
								(particle_system_burst, "psys_game_blood", pos2,95),
								(particle_system_burst, "psys_game_blood_2", pos2,95),
								(play_sound,"snd_metal_hit_low_armor_high_damage"),
								(agent_set_hit_points,":agent",0,0),
								#(agent_deliver_damage_to_agent,":agent",":agent"), #SW modified
								(agent_deliver_damage_to_agent,":player_agent",":agent"),
                              (end_try),],)]],
 
Ugga Bugga the whole code block is a weapon. Its invisible so it won't show up in your hand but you could copypaste that into module_items and it would work right off the bat.
 
funny, i kept your mod to attempt to see how you did the force kill.

so this might be implemented in a large weapon to strike multiple opponents?
would it be splash damage, or would it deal damage when the animation went by the targets?
 
I got her figured check the area damage improvement thread for the code.  killkhergit gave me the idea so I figure most props should go to him.
 
Status
Not open for further replies.
Back
Top Bottom