Jump to content
Sign in to follow this  
eggbeast

BIS_Effects_EH_Fired

Recommended Posts

BIS_Effects_EH_Fired

does anyone know what this eventhandler actually does?

where can i find the source code?

I noticed it has been to various planes over time

we've just added it to our A10 and it seems to be the cause of a horrific permanent explosion effect on a persistent MP server

A10_fire-1_zps678ce226.jpg

it's been attached to the A10 wreck for days and the only thing I can think of that caused it was the addition of the EH.

it causes problems like this for the tower sniper lol

http://i162.photobucket.com/albums/t247/eggbeast/firebug_zps6f3e3907.jpg

	class EventHandlers
	{
		killed = "_this call BIS_Effects_EH_Killed;";
	};

we attached it to a variety of planes, thinking it may help say with cleanup of carcasses/groups or something else, but not really sure... anyone have a clue? no searching results for it on google or in here

cheers

EB

Edited by eggbeast

Share this post


Link to post
Share on other sites

yep that's it - spawning in the planes with the recently added EH on them and then blowing them up causes the fire in the sky bug - i think i finally discovered a repro mission for the bug!! damn!

Share this post


Link to post
Share on other sites

FIXED

dwarden gave me a script to fix this which will be in every evolution mission henceforth

we have out it onto our servers and not seen the bug since

thanks D!

EB

Share this post


Link to post
Share on other sites

Thank you much!!

---------- Post added at 17:59 ---------- Previous post was at 17:55 ----------

cant seem to unpack those missions.

Share this post


Link to post
Share on other sites

try the ones in the uns_test_missions rar

uns_test_missions.rar\@ambient_test10.us101_Cao_Bang

look in the init and also in the folder \new_effects

Share this post


Link to post
Share on other sites
try the ones in the uns_test_missions rar

uns_test_missions.rar\@ambient_test10.us101_Cao_Bang

look in the init and also in the folder \new_effects

That's exactly what I needed, thank you!!

Share this post


Link to post
Share on other sites

Code from init:

/////////////////Dwarden fixing fire in the sky bug

BIS_Effects_EH_Killed=compile preprocessFileLineNumbers "new_effects\killed.sqf";
BIS_Effects_AirDestruction=compile preprocessFileLineNumbers "new_effects\AirDestruction.sqf";
BIS_Effects_AirDestructionStage2=compile preprocessFileLineNumbers "new_effects\AirDestructionStage2.sqf";

BIS_Effects_globalEvent = 
{
BIS_effects_gepv = _this;
publicVariable "BIS_effects_gepv";
    _this call BIS_Effects_startEvent;
};

BIS_Effects_startEvent = 
{
switch (_this select 0) do 
{
    		case "AirDestruction": 
	{
          	[_this select 1] spawn BIS_Effects_AirDestruction;
	};
          case "AirDestructionStage2": 
	{
          	[_this select 1, _this select 2, _this select 3] spawn BIS_Effects_AirDestructionStage2;
	};
          case "Burn": 
	{
          	[_this select 1, _this select 2, _this select 3, false, true] spawn BIS_Effects_Burn;
	};
};
};
"BIS_effects_gepv" addPublicVariableEventHandler {(_this select 1) call BIS_Effects_startEvent;};

killed.sqf:

private ["_v","_int","_t"];
_v=_this select 0;
if (_v iskindof "helicopter" || _v iskindof "plane")
then
{
	//_v setVehicleInit "[this] spawn BIS_Effects_AirDestruction";
	//processInitCommands; //ClearvehicleInit done at end of burn script
	["AirDestruction", _v] call BIS_Effects_globalEvent;
};
if (_v iskindof "tank")
then
{
     	_int = (fuel _v)*(2+random 2);
	_t=time;
	//_v setVehicleInit format ["[this, %1, %2]spawn BIS_Effects_Burn",_int, _t];   - disabled to prepaire for move into engine
	//processInitCommands; //ClearvehicleInit done at end of burn script
	[_v,_int] spawn BIS_Effects_Secondaries;
};
if (_v iskindof "car" || _v iskindof "ship")
then
{
	_int = (fuel _v)*(2 + random 1);
	_t=time;

	//_v setVehicleInit format ["[this, %1, %2]spawn BIS_Effects_Burn; ",_int, _t];  - disabled to prepaire for move into engine
	//processInitCommands; //ClearvehicleInit done at end of burn script
	[_v,_int] spawn BIS_Effects_Secondaries;

	//Possible initial explosion
	if ((random _int)>2.2) then
	{
			_b="SmallSecondary" createvehicle (getpos _v);
	};
};

airdestruction.sqf:

_v=_this select 0;
_int = (fuel _v)*(8+random 2);
_t=time;

if !(isDedicated) then { //dw, particle stuff don't need run on dedicated

_fl = "#particlesource" createVehicleLocal getpos _v;
_fl attachto [_v,[0,0,0],"destructionEffect2"];
_fl setParticleRandom [0.3, [1, 1, 0], [0, 0, 0], 0, 0.3, [0, 0, 0, 0], 0, 0];
_fl setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 10, 32], "", "Billboard", 1, 2, "destructionEffect2",
			[0, 0, 5], 0, 10, 7.9, 0.075, [4,7,9,10], [[1, 1, 1, -1], [1, 1, 1, -1],
			[1, 1, 1, -1], [1, 1, 1, -0.5], [1, 1, 1, -0]], [1,0.5], 1, 0, "", "", _v];
_fl setDropInterval 1;

_sm = "#particlesource" createVehicleLocal getpos _v;
_sm attachto [_v,[0,0,0],"destructionEffect1"];
_sm setParticleRandom [2, [2, 2, 0], [0, 0, 0], 0, 0.3, [0, 0, 0, 0.1], 0, 0];
_sm setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 7, 48], "", "Billboard", 1, 5, "destructionEffect1",
			[0, 0, 5], 0, 10, 7.9, 0.075, [4,8,12,14], [[0.3, 0.3, 0.3, 1],
			[0.45, 0.45, 0.45, 1],[0.6, 0.6, 0.6, 0.6], [0.7, 0.7, 0.7, 0.25], [1, 1, 1, 0]], [0.8,0.3,0.25], 1, 0, "", "", _v];
_sm setDropInterval 1;

}; // end of dedicated check

_i=0;
_dr=0.2;
_tv=11;


//Remove weapons/ammo to prevent explosion. Script will create its own explosions (doesnt work?)
removeallweapons _v;

if (local _v) then {_expl="HelicopterExploSmall" createvehicle (getpos _v);};

if !(isDedicated) then { //dw, particle stuff don't need run on dedicated
while {_i <1200 && ((velocity _v select 2)<-20 || (getpos _v select 2)>8) && !(alive _v) && !(isnull _v) && (getpos _v select 2)>1} do
{
_tv=abs(velocity _v select 0)+abs(velocity _v select 1)+abs(velocity _v select 2);
if (_tv>2) then {_dr=1/_tv} else {_dr=1};
_fl setDropInterval _dr;
_sm setDropInterval _dr;
_i=_i+1;
sleep 0.2;
};
}; // end of dedicated check

_pos=getpos _v;
clearVehicleInit _v;

if !(isDedicated) then { //dw, particle stuff don't need run on dedicated
deletevehicle _fl;deletevehicle _sm;
}; // end of dedicated check
if (surfaceiswater(_pos) && (_pos select 2)<9 ) then
{
if !(isDedicated) then { //dw, particle stuff don't need run on dedicated
_wave = "#particlesource" createVehicleLocal getpos _v;
_wave attachto [_v,[0,0,0],"destructionEffect1"];
_wave setParticleRandom [0.3, [1, 1, 0], [0.5, 0.5, 0], 0, 0.3, [0, 0, 0, 0], 0, 0];
_wave setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 12, 13,0], "", "Billboard", 1, 1.6, "destructionEffect1",
		[0, 0, 0], 0, 10, 7.9, 0.075, [3,8],
		[[0.7,0.8,1,0.6],[0.85,0.9,1,0.0]], [1000], 1, 0, "", "", _v];
_wave setparticlecircle [2,[0,16,0]];
_wave setDropInterval 0.0015;

_splash = "#particlesource" createVehicleLocal getpos _v;
_splash attachto [_v,[0,0,0],"destructionEffect1"];
_splash setParticleRandom [2, [2, 2, 0], [2, 2, 7], 0, 0.5, [0, 0, 0, 0], 0, 0];
_splash setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 13, 6, 0], "", "Billboard", 1, 4, "destructionEffect1",
		[0, 0, 0], 0, 30, 7.9, 0.075, [8,15],
		[[0.7,0.7,0.7,1],[1,1,1,0]], [1000], 1, 0, "", "", _v];
_splash setparticlecircle [2,[0,3,15]];
_splash setDropInterval 0.002;

sleep 0.2;
deletevehicle _wave;deletevehicle _splash;
}; // end of dedicated check
        /*
if (local _v) then
	{
		_wreck=GetText (configFile >> "CfgVehicles" >> (typeof _v) >> "wreck");
		if (_wreck!="") then
		{
			_pos = getpos _v;
			_dir = vectordir _v;
			_vecUp = vectorup _v;
			_vel = velocity _v;

			clearvehicleinit _v;
			_crw= crew _v;
			clearvehicleinit _v;
			deleteVehicle _v;
			_v =(_wreck) createvehicle _pos;
			{_x moveincargo _v} foreach _crw;
			_v setVectorDirAndUp [_dir,_vecUp];
			_v setFuel 0;
			_v setdamage 0;
			_v setvelocity _vel;
			//Send to garbage collecter so wreck can be deleted later
			[_v] call BIS_GC_trashItFunc;

		};
	};      */
}
else
{
if (local _v) then
{
	//_velx = velocity _v select 0; _velx = _velx / 4;
	//_vely = velocity _v select 1; _vely = _vely / 4;
	_velz=velocity _v select 2;
	if (_velz>1) then (_v setvelocity [velocity _v select 0,velocity _v select 1,0]);
	_expl="HelicopterExploBig" createvehicle [_pos select 0,_pos select 1,(_pos select 2) + 1];
	sleep 0.05;
               /*
	_wreck=GetText (configFile >> "CfgVehicles" >> (typeof _v) >> "wreck");
	if (_wreck!="") then
		{
			_pos = getpos _v;
			_dir = vectordir _v;
			_vecUp = vectorup _v;
			_vel = velocity _v;

			_crw= crew _v;
			clearvehicleinit _v;
			deleteVehicle _v;
			_v =(_wreck) createvehicle _pos;
			{_x moveincargo _v} foreach _crw;
			//sleep 0.05;
			_v setvelocity _vel;
			//_v setPos _pos;
			_v setvectordir (_dir);
			_v setvectorup _vecUp;
			_v setFuel 0;
			_v setdamage 0;


		};    */
	//_v setVehicleInit format ["[this, %1, %2]spawn BIS_Effects_AirDestructionStage2",_int, _t];
	//processInitCommands; //ClearvehicleInit done at end of burn script
	["AirDestructionStage2", _v, _int, _t] call BIS_Effects_globalEvent;
};
};

airdestructionstage2.sqf:

_v=_this select 0;
_int = _this select 1;
_t=_this select 2;
_pos=getpos _v;
// Particle effects
if !(isDedicated) then { //dw, particle stuff don't need run on dedicated
_smoke = "#particlesource" createVehicleLocal _pos;
_smoke attachto [_v,[0,0,0],"destructionEffect1"];
_smoke setParticleParams [["\ca\Data\ParticleEffects\Universal\Universal",16,7,48],
		"", "Billboard", 1, 15, [0, 0, 0], [0, 0, 0], 1, 1.275, 1, 0, [8,14],
		[[0.1,0.1,0.1,1],[0.1,0.1,0.1,0]], [0.5], 0.1, 0.1, "", "", _v];
//_smoke setParticleCircle [2,[0,0,0]];
_smoke setParticleRandom [4, [2, 2, 2], [0, 0, 0], 0, 0, [0, 0, 0, 0], 0, 0];
_smoke setDropInterval 0.02;

_fire = "#particlesource" createVehicleLocal _pos;
_fire attachto [_v,[0,0,0],"destructionEffect2"];
/*_fire setParticleParams [["\ca\Data\ParticleEffects\Universal\Universal",16,2,32], "", "Billboard", 1, 1, [0, 1, 0], [0, 0, 0], 1, 1.275, 1, 0, [10,15],
         [[1,1,1,-1],[1,1,1,0]], [0.5], 0.01, 0.01, "", "", _v,360]; */
_fire setParticleParams [["\ca\Data\ParticleEffects\Universal\Universal",16,2,80],
	"", "Billboard", 1, 2, [0, 1, 0], [0, 0, 0], 1, 1.275, 1, 0, [7,13],
               [[1,1,1,-1],[1,1,1,0]], [0.5], 0.01, 0.01, "", "", _v,360];
_fire setParticleRandom [0.5, [0.5, 0.5, 0.5], [0, 0, 0], 0, 0, [0, 0, 0, 0], 0, 0];
_fire setDropInterval 0.01;
/*
_shards = "#particlesource" createVehicleLocal _pos;
//_shards attachto [_v,[0,0,0],"destructionEffect1"];
_shards setParticleParams [["\CA\Data\ParticleEffects\Shard\shard",1,0,1], "", "SpaceObject", 1, 60, [0, 0, 0], [0, 0, 0], 0, 1.275, 1, 0, [1,1],
                      [[1,1,1,1]], [0.5], 0, 0, "", "", _v];
	       _shards setParticleRandom [30, [1, 1, 0], [0, 0, 0], 0, 0, [0, 0, 0, 0], 0, 0];
_shards setParticleCircle [2,[0.001,0.001,-0.001]];
_shards setDropInterval 0.05;
*/
_dirt = "#particlesource" createVehicleLocal _pos;
_dirt attachto [_v,[0,0,0],"destructionEffect1"];
_dirt setParticleParams [["\ca\Data\ParticleEffects\Universal\Universal",16,12,9,0], "", "Billboard", 1, 5, [0, 0, 0], [0, 0, 5], 0, 5, 1, 0, [10,20],
  [[0.1,0.1,0.1,1],[0.1,0.1,0.1,0.7],[0.1,0.1,0.1,0]], [1000], 0, 0, "", "", _v,360];
  _dirt setParticleRandom [0, [1, 1, 1], [1, 1, 2.5], 0, 0, [0, 0, 0, 0.5], 0, 0];
_dirt setDropInterval 0.05;

//creating ground craters
_i=0;
while {(speed _v) > 0.1} do
{
	_pos=getpos _v;
	_xv=velocity _v select 0;
	_yv=velocity _v select 1;
	_dir = abs(_xv atan2 _yv);

	_Crater= "CraterLong" createvehiclelocal [_pos select 0, _pos select 1, 0];
	_Crater setdir (_dir + (180 * _i));
	_Crater setpos [_pos select 0, _pos select 1, 0];
	_Crater setPos [_pos select 0, _pos select 1, ((0 - _i)/13)]; //all setpos commands so it is placed correctly on sloped terrain
	_speed = (speed _v);
	_velz=velocity _v select 2;

	if (_velz>1) then {_v setvelocity [_xv/1.3,_yv/1.3,0]}
	else {_v setvelocity [_xv/1.2,_yv/1.2,velocity _v select 2]};

	_tv=abs(_xv)+abs(_yv)+abs(_zv);
	if (_tv>2) then {_dr=1/_tv} else {_dr=1};
	_smoke setDropInterval _dr*1.5;
	_fire setDropInterval _dr*1.5;
	_dirt setDropInterval _dr;
	_shards setDropInterval _dr;

	sleep (0.25 - (_speed / 1000));
	_i = _i + 1;
};
deleteVehicle _smoke;
deleteVehicle _fire;
deleteVehicle _shards;
deleteVehicle _dirt;

}; // end of dedicated check

_v setvelocity [0,0,-0.1];
if (local _v) then
{
//_v setVehicleInit format ["[this, %1, %2,false,true]spawn BIS_Effects_Burn",_int, _t];
//processInitCommands; //ClearvehicleInit done at end of burn script
["Burn", _v, _int, _t] call BIS_Effects_globalEvent;
[_v,_int,false] spawn BIS_Effects_Secondaries;
};
sleep 0.5;
_v setvelocity [0,0,-0.01];

Because I believe in posting back what you find out in the threads, so people 2 years down the line can find it and not be screwed ;)

Share this post


Link to post
Share on other sites
Code from init:

/////////////////Dwarden fixing fire in the sky bug

BIS_Effects_EH_Killed=compile preprocessFileLineNumbers "new_effects\killed.sqf";
BIS_Effects_AirDestruction=compile preprocessFileLineNumbers "new_effects\AirDestruction.sqf";
BIS_Effects_AirDestructionStage2=compile preprocessFileLineNumbers "new_effects\AirDestructionStage2.sqf";

BIS_Effects_globalEvent = 
{
BIS_effects_gepv = _this;
publicVariable "BIS_effects_gepv";
    _this call BIS_Effects_startEvent;
};

BIS_Effects_startEvent = 
{
switch (_this select 0) do 
{
    		case "AirDestruction": 
	{
          	[_this select 1] spawn BIS_Effects_AirDestruction;
	};
          case "AirDestructionStage2": 
	{
          	[_this select 1, _this select 2, _this select 3] spawn BIS_Effects_AirDestructionStage2;
	};
          case "Burn": 
	{
          	[_this select 1, _this select 2, _this select 3, false, true] spawn BIS_Effects_Burn;
	};
};
};
"BIS_effects_gepv" addPublicVariableEventHandler {(_this select 1) call BIS_Effects_startEvent;};

killed.sqf:

private ["_v","_int","_t"];
_v=_this select 0;
if (_v iskindof "helicopter" || _v iskindof "plane")
then
{
	//_v setVehicleInit "[this] spawn BIS_Effects_AirDestruction";
	//processInitCommands; //ClearvehicleInit done at end of burn script
	["AirDestruction", _v] call BIS_Effects_globalEvent;
};
if (_v iskindof "tank")
then
{
     	_int = (fuel _v)*(2+random 2);
	_t=time;
	//_v setVehicleInit format ["[this, %1, %2]spawn BIS_Effects_Burn",_int, _t];   - disabled to prepaire for move into engine
	//processInitCommands; //ClearvehicleInit done at end of burn script
	[_v,_int] spawn BIS_Effects_Secondaries;
};
if (_v iskindof "car" || _v iskindof "ship")
then
{
	_int = (fuel _v)*(2 + random 1);
	_t=time;

	//_v setVehicleInit format ["[this, %1, %2]spawn BIS_Effects_Burn; ",_int, _t];  - disabled to prepaire for move into engine
	//processInitCommands; //ClearvehicleInit done at end of burn script
	[_v,_int] spawn BIS_Effects_Secondaries;

	//Possible initial explosion
	if ((random _int)>2.2) then
	{
			_b="SmallSecondary" createvehicle (getpos _v);
	};
};

airdestruction.sqf:

_v=_this select 0;
_int = (fuel _v)*(8+random 2);
_t=time;

if !(isDedicated) then { //dw, particle stuff don't need run on dedicated

_fl = "#particlesource" createVehicleLocal getpos _v;
_fl attachto [_v,[0,0,0],"destructionEffect2"];
_fl setParticleRandom [0.3, [1, 1, 0], [0, 0, 0], 0, 0.3, [0, 0, 0, 0], 0, 0];
_fl setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 10, 32], "", "Billboard", 1, 2, "destructionEffect2",
			[0, 0, 5], 0, 10, 7.9, 0.075, [4,7,9,10], [[1, 1, 1, -1], [1, 1, 1, -1],
			[1, 1, 1, -1], [1, 1, 1, -0.5], [1, 1, 1, -0]], [1,0.5], 1, 0, "", "", _v];
_fl setDropInterval 1;

_sm = "#particlesource" createVehicleLocal getpos _v;
_sm attachto [_v,[0,0,0],"destructionEffect1"];
_sm setParticleRandom [2, [2, 2, 0], [0, 0, 0], 0, 0.3, [0, 0, 0, 0.1], 0, 0];
_sm setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 7, 48], "", "Billboard", 1, 5, "destructionEffect1",
			[0, 0, 5], 0, 10, 7.9, 0.075, [4,8,12,14], [[0.3, 0.3, 0.3, 1],
			[0.45, 0.45, 0.45, 1],[0.6, 0.6, 0.6, 0.6], [0.7, 0.7, 0.7, 0.25], [1, 1, 1, 0]], [0.8,0.3,0.25], 1, 0, "", "", _v];
_sm setDropInterval 1;

}; // end of dedicated check

_i=0;
_dr=0.2;
_tv=11;


//Remove weapons/ammo to prevent explosion. Script will create its own explosions (doesnt work?)
removeallweapons _v;

if (local _v) then {_expl="HelicopterExploSmall" createvehicle (getpos _v);};

if !(isDedicated) then { //dw, particle stuff don't need run on dedicated
while {_i <1200 && ((velocity _v select 2)<-20 || (getpos _v select 2)>8) && !(alive _v) && !(isnull _v) && (getpos _v select 2)>1} do
{
_tv=abs(velocity _v select 0)+abs(velocity _v select 1)+abs(velocity _v select 2);
if (_tv>2) then {_dr=1/_tv} else {_dr=1};
_fl setDropInterval _dr;
_sm setDropInterval _dr;
_i=_i+1;
sleep 0.2;
};
}; // end of dedicated check

_pos=getpos _v;
clearVehicleInit _v;

if !(isDedicated) then { //dw, particle stuff don't need run on dedicated
deletevehicle _fl;deletevehicle _sm;
}; // end of dedicated check
if (surfaceiswater(_pos) && (_pos select 2)<9 ) then
{
if !(isDedicated) then { //dw, particle stuff don't need run on dedicated
_wave = "#particlesource" createVehicleLocal getpos _v;
_wave attachto [_v,[0,0,0],"destructionEffect1"];
_wave setParticleRandom [0.3, [1, 1, 0], [0.5, 0.5, 0], 0, 0.3, [0, 0, 0, 0], 0, 0];
_wave setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 12, 13,0], "", "Billboard", 1, 1.6, "destructionEffect1",
		[0, 0, 0], 0, 10, 7.9, 0.075, [3,8],
		[[0.7,0.8,1,0.6],[0.85,0.9,1,0.0]], [1000], 1, 0, "", "", _v];
_wave setparticlecircle [2,[0,16,0]];
_wave setDropInterval 0.0015;

_splash = "#particlesource" createVehicleLocal getpos _v;
_splash attachto [_v,[0,0,0],"destructionEffect1"];
_splash setParticleRandom [2, [2, 2, 0], [2, 2, 7], 0, 0.5, [0, 0, 0, 0], 0, 0];
_splash setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 13, 6, 0], "", "Billboard", 1, 4, "destructionEffect1",
		[0, 0, 0], 0, 30, 7.9, 0.075, [8,15],
		[[0.7,0.7,0.7,1],[1,1,1,0]], [1000], 1, 0, "", "", _v];
_splash setparticlecircle [2,[0,3,15]];
_splash setDropInterval 0.002;

sleep 0.2;
deletevehicle _wave;deletevehicle _splash;
}; // end of dedicated check
        /*
if (local _v) then
	{
		_wreck=GetText (configFile >> "CfgVehicles" >> (typeof _v) >> "wreck");
		if (_wreck!="") then
		{
			_pos = getpos _v;
			_dir = vectordir _v;
			_vecUp = vectorup _v;
			_vel = velocity _v;

			clearvehicleinit _v;
			_crw= crew _v;
			clearvehicleinit _v;
			deleteVehicle _v;
			_v =(_wreck) createvehicle _pos;
			{_x moveincargo _v} foreach _crw;
			_v setVectorDirAndUp [_dir,_vecUp];
			_v setFuel 0;
			_v setdamage 0;
			_v setvelocity _vel;
			//Send to garbage collecter so wreck can be deleted later
			[_v] call BIS_GC_trashItFunc;

		};
	};      */
}
else
{
if (local _v) then
{
	//_velx = velocity _v select 0; _velx = _velx / 4;
	//_vely = velocity _v select 1; _vely = _vely / 4;
	_velz=velocity _v select 2;
	if (_velz>1) then (_v setvelocity [velocity _v select 0,velocity _v select 1,0]);
	_expl="HelicopterExploBig" createvehicle [_pos select 0,_pos select 1,(_pos select 2) + 1];
	sleep 0.05;
               /*
	_wreck=GetText (configFile >> "CfgVehicles" >> (typeof _v) >> "wreck");
	if (_wreck!="") then
		{
			_pos = getpos _v;
			_dir = vectordir _v;
			_vecUp = vectorup _v;
			_vel = velocity _v;

			_crw= crew _v;
			clearvehicleinit _v;
			deleteVehicle _v;
			_v =(_wreck) createvehicle _pos;
			{_x moveincargo _v} foreach _crw;
			//sleep 0.05;
			_v setvelocity _vel;
			//_v setPos _pos;
			_v setvectordir (_dir);
			_v setvectorup _vecUp;
			_v setFuel 0;
			_v setdamage 0;


		};    */
	//_v setVehicleInit format ["[this, %1, %2]spawn BIS_Effects_AirDestructionStage2",_int, _t];
	//processInitCommands; //ClearvehicleInit done at end of burn script
	["AirDestructionStage2", _v, _int, _t] call BIS_Effects_globalEvent;
};
};

airdestructionstage2.sqf:

_v=_this select 0;
_int = _this select 1;
_t=_this select 2;
_pos=getpos _v;
// Particle effects
if !(isDedicated) then { //dw, particle stuff don't need run on dedicated
_smoke = "#particlesource" createVehicleLocal _pos;
_smoke attachto [_v,[0,0,0],"destructionEffect1"];
_smoke setParticleParams [["\ca\Data\ParticleEffects\Universal\Universal",16,7,48],
		"", "Billboard", 1, 15, [0, 0, 0], [0, 0, 0], 1, 1.275, 1, 0, [8,14],
		[[0.1,0.1,0.1,1],[0.1,0.1,0.1,0]], [0.5], 0.1, 0.1, "", "", _v];
//_smoke setParticleCircle [2,[0,0,0]];
_smoke setParticleRandom [4, [2, 2, 2], [0, 0, 0], 0, 0, [0, 0, 0, 0], 0, 0];
_smoke setDropInterval 0.02;

_fire = "#particlesource" createVehicleLocal _pos;
_fire attachto [_v,[0,0,0],"destructionEffect2"];
/*_fire setParticleParams [["\ca\Data\ParticleEffects\Universal\Universal",16,2,32], "", "Billboard", 1, 1, [0, 1, 0], [0, 0, 0], 1, 1.275, 1, 0, [10,15],
         [[1,1,1,-1],[1,1,1,0]], [0.5], 0.01, 0.01, "", "", _v,360]; */
_fire setParticleParams [["\ca\Data\ParticleEffects\Universal\Universal",16,2,80],
	"", "Billboard", 1, 2, [0, 1, 0], [0, 0, 0], 1, 1.275, 1, 0, [7,13],
               [[1,1,1,-1],[1,1,1,0]], [0.5], 0.01, 0.01, "", "", _v,360];
_fire setParticleRandom [0.5, [0.5, 0.5, 0.5], [0, 0, 0], 0, 0, [0, 0, 0, 0], 0, 0];
_fire setDropInterval 0.01;
/*
_shards = "#particlesource" createVehicleLocal _pos;
//_shards attachto [_v,[0,0,0],"destructionEffect1"];
_shards setParticleParams [["\CA\Data\ParticleEffects\Shard\shard",1,0,1], "", "SpaceObject", 1, 60, [0, 0, 0], [0, 0, 0], 0, 1.275, 1, 0, [1,1],
                      [[1,1,1,1]], [0.5], 0, 0, "", "", _v];
	       _shards setParticleRandom [30, [1, 1, 0], [0, 0, 0], 0, 0, [0, 0, 0, 0], 0, 0];
_shards setParticleCircle [2,[0.001,0.001,-0.001]];
_shards setDropInterval 0.05;
*/
_dirt = "#particlesource" createVehicleLocal _pos;
_dirt attachto [_v,[0,0,0],"destructionEffect1"];
_dirt setParticleParams [["\ca\Data\ParticleEffects\Universal\Universal",16,12,9,0], "", "Billboard", 1, 5, [0, 0, 0], [0, 0, 5], 0, 5, 1, 0, [10,20],
  [[0.1,0.1,0.1,1],[0.1,0.1,0.1,0.7],[0.1,0.1,0.1,0]], [1000], 0, 0, "", "", _v,360];
  _dirt setParticleRandom [0, [1, 1, 1], [1, 1, 2.5], 0, 0, [0, 0, 0, 0.5], 0, 0];
_dirt setDropInterval 0.05;

//creating ground craters
_i=0;
while {(speed _v) > 0.1} do
{
	_pos=getpos _v;
	_xv=velocity _v select 0;
	_yv=velocity _v select 1;
	_dir = abs(_xv atan2 _yv);

	_Crater= "CraterLong" createvehiclelocal [_pos select 0, _pos select 1, 0];
	_Crater setdir (_dir + (180 * _i));
	_Crater setpos [_pos select 0, _pos select 1, 0];
	_Crater setPos [_pos select 0, _pos select 1, ((0 - _i)/13)]; //all setpos commands so it is placed correctly on sloped terrain
	_speed = (speed _v);
	_velz=velocity _v select 2;

	if (_velz>1) then {_v setvelocity [_xv/1.3,_yv/1.3,0]}
	else {_v setvelocity [_xv/1.2,_yv/1.2,velocity _v select 2]};

	_tv=abs(_xv)+abs(_yv)+abs(_zv);
	if (_tv>2) then {_dr=1/_tv} else {_dr=1};
	_smoke setDropInterval _dr*1.5;
	_fire setDropInterval _dr*1.5;
	_dirt setDropInterval _dr;
	_shards setDropInterval _dr;

	sleep (0.25 - (_speed / 1000));
	_i = _i + 1;
};
deleteVehicle _smoke;
deleteVehicle _fire;
deleteVehicle _shards;
deleteVehicle _dirt;

}; // end of dedicated check

_v setvelocity [0,0,-0.1];
if (local _v) then
{
//_v setVehicleInit format ["[this, %1, %2,false,true]spawn BIS_Effects_Burn",_int, _t];
//processInitCommands; //ClearvehicleInit done at end of burn script
["Burn", _v, _int, _t] call BIS_Effects_globalEvent;
[_v,_int,false] spawn BIS_Effects_Secondaries;
};
sleep 0.5;
_v setvelocity [0,0,-0.01];

Because I believe in posting back what you find out in the threads, so people 2 years down the line can find it and not be screwed ;)

Haha, it's all good guys, thanks for that too Beazley

Share this post


Link to post
Share on other sites

I have implemented these scripts on my server, but the fire bug persists still when people crash the aircraft. Any Ideas?

Share this post


Link to post
Share on other sites

maybe try a different tool to open my missions - it's all working in there

Share this post


Link to post
Share on other sites
maybe try a different tool to open my missions - it's all working in there
I have already unpacked you mission and added the new_effect folder to my mission and added the relevant lines of the init script into my init script but the problem persists. There must be something I have missed, although I dont think so. Here is my entire init.sqf, please have a look if you will and tell me if all is correct please.

if !isDedicated then { startLoadingScreen ["Loading...","RscLoadScreenCustom"]; };
enableSaving [false, false]; 
waitUntil { isServer || !isNull player }; 
waitUntil { !isNil "BIS_MPF_InitDone" }; 
waitUntil { BIS_MPF_InitDone };

// Global Variable Init
curTime				= time;    //mission start time
serverLoadHint      = false;   //server load hint message

/// place player UIDs here to enable extra toys for specific players. Toys are Apache, UH1Y, MH60M, and MV22
/// updated June 6, 2013. 
masterUIDArray = [
"xxxxxxxxxxxxxxxxx",
"xxxxxxxxxxxxxxxxx",
"xxxxxxxxxxxxxxxxx",
"xxxxxxxxxxxxxxxxx",
"xxxxxxxxxxxxxxxxx",
"xxxxxxxxxxxxxxxxx"
];
masterClassArray = ["AH64D_EP1","UH60M_MEV_EP1"];


if (local player) then { call compile preprocessFileLineNumbers "initclient.sqf"; }; 
if (isServer) then { call compile preprocessFileLineNumbers "initserver.sqf"; }; 

/////////////////Dwarden fixing fire in the sky bug

BIS_Effects_EH_Killed=compile preprocessFileLineNumbers "new_effects\killed.sqf";
BIS_Effects_AirDestruction=compile preprocessFileLineNumbers "new_effects\AirDestruction.sqf";
BIS_Effects_AirDestructionStage2=compile preprocessFileLineNumbers "new_effects\AirDestructionStage2.sqf";

BIS_Effects_globalEvent = 
{
BIS_effects_gepv = _this;
publicVariable "BIS_effects_gepv";
    _this call BIS_Effects_startEvent;
};

BIS_Effects_startEvent = 
{
switch (_this select 0) do 
{
    		case "AirDestruction": 
	{
          	[_this select 1] spawn BIS_Effects_AirDestruction;
	};
          case "AirDestructionStage2": 
	{
          	[_this select 1, _this select 2, _this select 3] spawn BIS_Effects_AirDestructionStage2;
	};
          case "Burn": 
	{
          	[_this select 1, _this select 2, _this select 3, false, true] spawn BIS_Effects_Burn;
	};
};
};
"BIS_effects_gepv" addPublicVariableEventHandler {(_this select 1) call BIS_Effects_startEvent;};


You will noticed that in the MasterUID part of the script I have hidden player steam ID's with XXXXXXXXXXXX becuase they don't want me to show them in the post.

Share this post


Link to post
Share on other sites

hmmm well youre separating out client and server init, maybe this means the script doesnt run properly? it works on mine - thats all i know sorry

Share this post


Link to post
Share on other sites
hmmm well youre separating out client and server init, maybe this means the script doesnt run properly? it works on mine - thats all i know sorry
Hey no worries dude you have been more than helpful already!

Share this post


Link to post
Share on other sites

Has anyone any ideas why this hasn't worked, I have tried and tried everything but nothing seems to work, very frustrating lol.

Share this post


Link to post
Share on other sites

maybe put it to the top of your init script

Share this post


Link to post
Share on other sites

will try that for sure

---------- Post added at 15:54 ---------- Previous post was at 15:47 ----------

maybe put it to the top of your init script

I wonder could I put the fire bug script into a separate file and execute it via the init.sqf

Share this post


Link to post
Share on other sites

nah in my mission there is some script / definitions that MUST be in your init, run on server and client

then the separate scripts that are called from that

Share this post


Link to post
Share on other sites

well I put it at the top of my init and it seemed to work for a long time, then it returned, beginning to give up now lol

Share this post


Link to post
Share on other sites

it's probably to do with you splitting up the inits for client and server. maybe run it on both? not sure. I want to d othat split in my missions too soon, so if i crack the problem i'll post here.

atm it works fine in all my missions (about 30 of them) that use it. but they all have a standard init structure

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  

×