Toasticuss
Sergeant
Hey guys, I came across an exploding arrow script from a script complication thread and I'm unable to get the arrow to explode. The only thing it does is shoot like a normal arrow and make a small fire particle after it hits something.
Here is the code for the entire object that went in the module_items.py
Any idea why its not working in MP?
Here is the code for the entire object that went in the module_items.py
Code:
["dr_e_arrows", "Explosive Arrows", [("arrow",0), ("flying_missile",ixmesh_flying_ammo), ("quiver", ixmesh_carry)], itp_type_arrows, itcf_carry_quiver_back, 0,weight(3)|abundance(160)|weapon_length(95)|thrust_damage(4, pierce)|max_ammo(20), imodbits_missile, [ (ti_on_missile_hit, [
#pos1 - Missile hit position
#param_1 - Shooter agent
(try_begin),
(multiplayer_is_server),
(store_trigger_param_1, ":shooter"),
(particle_system_burst, "psys_torch_fire", pos1, 100),
(get_max_players, ":max"),
(try_for_range, ":i", 1, ":max"),
(player_is_active, ":i"),
(player_get_agent_id, ":agent", ":i"),
(ge, ":agent", 0),
(agent_is_alive, ":agent"),
(agent_get_position, pos2, ":agent"),
(position_move_z, pos2, 50),
(get_distance_between_positions, ":dist", pos1, pos2),
(try_begin),
(lt, ":dist", 150),
(store_agent_hit_points, ":hp", ":agent", 1),
(val_sub, ":hp", 10),
(val_max, ":hp", 0),
(agent_set_hit_points, ":agent", ":hp", 1),
(try_begin),
(eq, ":hp", 0),
(agent_deliver_damage_to_agent, ":shooter", ":agent"),
(try_end),
(try_end),
(try_end),
(try_end),
]),
]],
Any idea why its not working in MP?