I want to create the plasma canon of XR, and I want the same sound of the launch that XR. I use certain model of VRO like plasma ma bullet, I know that the sound don't come from bullet but from launch ref, is : plasmaemitter_muzzle_02. The effect was edited, and added to components.xml
Code: Select all
<diff>
<replace sel="//macros">
<macros>
<macro name="bullet_gen_m_plasma_01_mk1_macro" class="bullet">
<component ref="bullet_ma" />
<properties>
<bullet speed="4500" lifetime="2.4" amount="1" barrelamount="1" icon="weapon_plasma_mk1" angle="0.05" maxhits="1" ricochet="0" scale="0" attach="0" />
<heat value="1592" />
<reload rate="0.75" />
<damage value="4000" shield="4400" repair="0" />
<effects>
<impact ref="plasmaemitter_player_impact" />
<launch ref="plasmaemitter_muzzle_02" />
</effects>
<weapon system="weapon_standard" />
</properties>
</macro>
</macros>
</replace>
</diff>
So, I open the effect file :
Code: Select all
<add sel="/effects">
<effect name="plasmaemitter_muzzle_02" minscale="0.75" maxscale="1.25" alignment="object">
<elements>
<!-- MuzzleGeometry + Light -->
<element id="1" ref="plasmaemitter_muzzle_02_macro" forkeffect="none" duration="0.1" forkmaterial="none" forklod="none"></element>
<!-- Sound -->
<element id="2" ref="effect_dummy_macro" forkeffect="none" duration="2.5" forkmaterial="none" forklod="none">
<sound ref="wpn_plasma_am_muzzle"></sound>
</element>
</elements>
</effect>
</add>
Code: Select all
<add sel="//soundlibrary">
<sound id="wpn_plasma_am_muzzle" description="AM_plasma sound" repeat="1" is3d="1" preload="1">
<sample start="extensions\test\sfx\weapons\plasma_am_cannon_1"/>
<volume start="1.25" distance="10"/>
</sound>
</add>
And at the end I will modify the M_plasma_01_mk1 weapon :
Code: Select all
<diff>
<replace sel="/macros">
<macros>
<macro name="weapon_gen_m_plasma_01_mk1_macro" class="weapon">
<component ref="weapon_gen_m_plasma_01_mk1" />
<properties>
<identification name="{20105,2064}" basename="{20105,2061}" shortname="{20105,2065}" description="{20105,2062}" mk="1" />
<bullet class="bullet_gen_m_plasma_01_mk1_macro" />
<heat overheat="10000" cooldelay="1.13" coolrate="2000" reenable="2000" />
<rotationspeed max="24.8" />
<rotationacceleration max="49.6" />
<hull max="1001" hittable="0" />
<effects>
<firing start="wpn_plasma_am_muzzle" />
</effects>
</properties>
</macro>
</macros>
</replace>
</diff>
<effects>
<firing start="wpn_plasma_am_muzzle" />
</effects>
The sound doesn't work, because when I shot with this weapon the same sound as vanilla is played. I don't know why, and where is my error.
I tested, if I replace the sound wpn_plasma_muzzle, the XR plasma sound work. Like that :
Code: Select all
<replace sel="//soundlibrary/sound[@id='wpn_plasma_muzzle']">
<sound id="wpn_plasma_muzzle" description="______" repeat="1" is3d="1" preload="1">
<sample selection="random">
<select start="extensions\rem\sfx\weapons\plasma_am_cannon_1 " />
</sample>
<volume start="0.8" distance="5" />
</sound>
</replace>
I hope you can help me