Jump to content
Sign in to follow this  
LtShadow

Sonic Boom! Custom made script, release!

Recommended Posts

Hello community! This has never been done before, a implemented SonicBoom script for any aircraft!

With help from ZooLoo (even though I never used any of his code, he helped me a lot! Thanks man.)

Please follow these instructions to implement this system into your aircraft:

Sonic Boom script by Tyler Bolhuis (tbo100)

Use this for non-shareware (freeware) aircraft only!

Please credit!

Thank you!

//1.) In the planes config, under Extended Event Handlers, there is always a plane_init or init.sqf, in here is where all the scripts are called for.

//2.) Goto this init file (for the FA18 it is init.sqf) ) copy a line from it, should look like this

_nul = [_plane] execVM "\f18c\scripts\fbfx.sqf";

//3.) Rename the last bit, the fbfx.sqf to whatever the file is. 4.) go into the fbfx.sqf and copy/paste the following :

_veh = (_this select 0);

//Private ["_script2[]"];

_script2 = [];

if (alive player) then
{
_script2 set [0, _veh execVM "\f18c\scripts\sonicboom.sqf"];
}; 

//5.) Create another script named; sonicboom.sqf place this where all the rest of the scripts are.

//6.) Edit the coding of the sonicboom script and paste the following

private "_boom";

_boom = false;

while {alive _this} do {
_sleeptime = 10;
while {!_boom} do {
	sleep  2;
	_speed = speed _this;
	if (_speed >= 760) exitWith {
	playsound "bBoom";
	_boom = true;
	};
};

sleep _sleeptime;
_boom = false;
};

//7.) Now, you need to create a class which configures the sound file 'bBoom'. To do this, go to the config.cpp located in the main directory of the aircraft. Right click, and click Edit.

//8.) Go to the beginning of the aircraft's .cpp (after all the init lines, like this; #define _ARMA_) and paste this:

class CfgSounds
{
   class bBoom {
       name = "bBoom";
       sound[] = {"\mig29\snd\tornado_gr4boom.wss", db+30, 1.0};  //Replace the mig29 and snd with the sound dir
       titles[] = {};
   };
};

NOTE: IF ONE AIRCRAFT ALREADY HAS THIS IN THEIR CONFIG FILE. YOU DO NOT NEED TO SET UP THIS CLASS! (Say if you already have the Mig29@RS which includes the SonicBoom, you do not need to code this bit into another aircraft) It will not work if you do not have this bit of code in the game, at least once! :)

//9.) Last Step (kinda)! All you need to do now is copy the sonic boom sample to the aircraft sound directory!

//10.) Don't forget to pack the aircraft, and move it into your addon directory!

Sonic Boom sample: Click Me!

Have Fun!

Share this post


Link to post
Share on other sites

Congrats on the release! :)

This has never been done before

I made a sonic boom script for an OA server about a year ago :P

You should re-type that as "This has never been released before!" xD

I recreated the shockwave-white bursts you see in sonic boom videos too - I'd give you the code for the particle effects but they probably won't work in A3 due to the changes in the textures and possible PhysX implementations.

You could also put this effect on every object if you wanted too since anything can break the sound barrier if it reached the right conditions. I put my sonic boom on a tank before and did some setVelocity magic, causing the tank to break the sound barrier and create some hilarious scenes on a server :P

Edited by zooloo75

Share this post


Link to post
Share on other sites

That's freaking fantastic!

Wouldn't be 1223km/h though? (not 760mph)

AND where did you get those AWESOME Jets in Arma3? LOVE IT!!!!

Share this post


Link to post
Share on other sites

I get error position:

Error in expression < (alive player) then
{
_script2 set [0, _veh execVM "\speedofsound_pure_A143\scr>
 Error position: <_veh execVM "\speedofsound_pure_A143\scr>
 Error Undefined variable in expression: _veh
File speedofsound_pure_A143\scripts\init.sqf, line 9

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×