I'm trying to add a separate sound for musket shots at a distance using the game_missile_launch script found in Napoleonic wars modsys. Here's the current code
What puzzles me is that in older posts I've read nobody had any complaints when using a very similar code, but in this case the sounds are very quiet, practically nonexistent. I'd like the sounds to be similar to those in WFaS which uses a different method alltogether that didn't seem to work when I tried it. So unless I'm doing something wrong I'm guessing it's gonna require a lot more intricate code?
Code:
("game_missile_launch",
[
(try_begin),
(neg|multiplayer_is_dedicated_server),
(store_script_param, ":agent_id", 1),
(store_script_param, ":item_id", 2),
(store_script_param, ":missile_weapon_id", 3),
(agent_is_active,":agent_id"),
(agent_is_alive,":agent_id"),
(neq,":missile_weapon_id","itm_cannon_canister_dummy"),
(set_fixed_point_multiplier, 100),
(copy_position,pos41,pos1),
(assign, ":sound_id", -1),
(assign, ":muzzle_y", 0),
(assign, ":muzzle_x", -16),
(assign, ":muzzle_y_rot", 0),
(assign, ":has_pan", 1),
# (assign, ":pan_y", 0),
(assign, ":smoke_size", 17),
(assign, ":spark_size", 100),
(assign, ":pan_smoke_size", 8),
(try_begin),
(is_between,":item_id","itm_french_cav_pistol","itm_french_mousquiton"), # Pistols
(assign, ":sound_id", "snd_pistol"),
(assign, ":muzzle_y", 44),
(assign, ":muzzle_x", 0),
(assign, ":muzzle_y_rot", -45),
(assign, ":has_pan", 0),
(assign, ":smoke_size", 14),
(assign, ":spark_size", 40),
(else_try),
(is_between,":item_id","itm_french_mousquiton","itm_wheellock_carbine_1"), # MATCHLOCKS
(mission_cam_get_position, pos5),
(get_distance_between_positions_in_meters, ":dist", pos1, pos5),
(try_begin),
(ge, ":dist", 50),
(assign, ":sound_id", "snd_musket_far"),
(else_try),
(assign, ":sound_id", "snd_musket"),
(try_end),
(assign, ":muzzle_y", 104),
(else_try),
(is_between,":item_id","itm_wheellock_carbine_1","itm_firelock_regular_long"), # WHELLLOCKS
(assign, ":sound_id", "snd_wheellock"),
(assign, ":muzzle_y", 90),
(else_try),
(is_between,":item_id","itm_firelock_regular_long","itm_french_art_off_sword"), # FLINTLOCKS
(assign, ":sound_id", "snd_musket"),
(assign, ":muzzle_y", 132),
(try_end),
(try_begin),
(call_script, "script_client_get_my_agent"),
(eq, ":agent_id", reg0), # shooting myself.
# particles for myself 65% so i can see what I shoot at.
(val_mul,":smoke_size", 65),
(val_div,":smoke_size", 100),
(val_mul,":pan_smoke_size", 65),
(val_div,":pan_smoke_size", 100),
(try_end),
# Sounds
(gt, ":sound_id", -1),
(play_sound_at_position, ":sound_id", pos41),
# Default movement
(position_move_x,pos41,":muzzle_x"),
(position_move_y,pos41,18),
# pan flash and smoke..
(try_begin),
(eq,":has_pan",1),
(particle_system_burst_no_sync, "psys_pan_smoke", pos41, ":pan_smoke_size"),
#(position_rotate_z, pos41, 45),
(particle_system_burst_no_sync, "psys_pan_flash", pos41, 4),
#(position_rotate_z, pos41, -45),
(try_end),
# the fire particles
(position_rotate_z,pos41,":muzzle_y_rot"),
(position_move_y,pos41,":muzzle_y"),
(particle_system_burst_no_sync, "psys_musket_smoke", pos41, ":smoke_size"),
(particle_system_burst_no_sync, "psys_musket_flash", pos41, ":spark_size"),
#(particle_system_burst_no_sync, "psys_musket_sparks", pos41, ":spark_size"),
(try_end),
]),
What puzzles me is that in older posts I've read nobody had any complaints when using a very similar code, but in this case the sounds are very quiet, practically nonexistent. I'd like the sounds to be similar to those in WFaS which uses a different method alltogether that didn't seem to work when I tried it. So unless I'm doing something wrong I'm guessing it's gonna require a lot more intricate code?