Hey All,
With this tutorial you will have an cool sound addon to your chopper..
I will explain this step by step..
The first step.
Open up maps/mp/_helicopter_manned.gsc
Go to line 236 and you will see there is a line with this code.
chopper thread heli_existance();
You will have to add the following line under this.
chopper thread maps\mp\_heli_air::voice_heli();
So it looks like this.
chopper thread heli_existance();
chopper thread maps\mp\_heli_air::voice_heli();
Repeat those steps for maps/mp/_helicopter_unmanned.gsc ..
The only thing that is different that is the line number.
For this it is line 247.
After you have done this create a new .gsc file named _heli_air.gsc.
And past the following code into it.
voice_heli()
{
self thread voice_heli_damage();
self thread voice_heli_crashing();
self thread voice_heli_leaving();
}
voice_heli_damage()
{
self endon( "death" );
self endon( "leaving" );
self endon( "crashing" );
wait 3.0;
voice_heli_do("_inform_attack_scan");
while(1)
{
wait 0.5;
if (self.damageTaken > 0)
{
//TODO: call warning...
break;
}
}
}
voice_heli_crashing()
{
self endon( "death" );
self endon( "leaving" );
self waittill( "crashing" );
voice_heli_do("_inform_hit_crash");
}
voice_heli_leaving()
{
self endon( "death" );
self endon( "crashing" );
self waittill( "leaving" );
voice_heli_do("_inform_return");
}
voice_heli_do(info)
{
prefix = "";
if ( self.pers["team"] == "allies" )
{
if ( game["allies"] == "sas" )
prefix = "UK_rhp";
else
prefix = "US_rhp";
}
else if(self.pers["team"] == "axis")
{
if ( game["axis"] == "russian" )
prefix = "RU_rhp";
else
prefix = "AB_ohp";
}
if ( prefix != "" )
self thread maps\mp\gametypes\_battlechatter_mp::doSound( prefix + info );
}
When you have done this move this file named _heli_air.gsc to maps/mp/ where you edited in the previous steps two other .gsc files.
Now its time to change and add something to the raw files.
Open up your folder with the X4 raw files.
Be sure you know what you are doing!
Download the file _heli_air.csv and paste it into your soundaliases folder thats located in the X4 raw folder.
Download Here[/color]
Normally the folder is located here : ff/soundaliases
When you are finished with this you have to do one more thing.
Open your mod.csv thats located in the raw folder named ff.
Go to line 143 and add this line.
sound,_heli_air,,all_mp
If you have done this it should look like this..
sound,extreme,,all_mp
sound,_heli_air,,all_mp
sound,music,,all_mp
sound,nic,,,
Okay now you are ready to create the new mod.ff
After compiling it youre addon is ready!
I hope you enjoyed my tutorial.
If there are any questions give me an reply..
Greetings PhoeniX