I have managed to add back crossbows (animations and sounds) to a Napoleonic Wars based mod and have both crossbows and muskets working properly but I have an issue with the particles. I would like to restrict the smoke and explosions to muskets and pistols only (in other words only
items).
("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_russian_rifle_1805"), # Carabines
(assign, ":sound_id", "snd_musket"), # snd_carabine
(assign, ":muzzle_y", 104),
(else_try),
(is_between,":item_id","itm_russian_rifle_1805","itm_french_charleville"), # Rifles
(assign, ":sound_id", "snd_rifle"),
(assign, ":muzzle_y", 90),
(else_try),
(is_between,":item_id","itm_french_charleville","itm_french_art_off_sword"), # Muskets
(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),
]),
I don't know if anyone tried before. Any help would be greatly appreciated.