AL_roadflare\al_roadflare_effect.sqf [& AL_roadflare\static_flare.sqf [.
Briefing.sqf ʢvWJ
description.ext P>X Img\alias.jpg MzU9 Img\Overlay.jpg >X Img\Snapshot.jpg c>Xʢ ini_roadflare.sqf z.[K init.sqf k.[ mission.sqm ][5 sound\fl_burn_1.ogg }=X sound\fl_burn_2.ogg =Xs sound\fl_burn_3.ogg =X4 sound\fl_start_1.ogg =X> sound\fl_start_2.ogg =XP sound\fl_start_3.ogg )=X , // by ALIAS
// Roadflare DEMO
// Tutorial: https://www.youtube.com/user/aliascartoons
private ["_al_roadflare","_flare_azimut","_fum_flare","_al_throwable_light","_al_spark","_press_implicit_x","_press_implicit_y"];
if (!hasInterface) exitWith {};
_al_roadflare = _this select 0;
_type_roadflare = _this select 1;
_culoare_elem = _this select 2;
_flare_azimut = getDir _al_roadflare; //hint str _flare_azimut;
if (_flare_azimut<=90) then {
_press_implicit_x = linearConversion [0, 90,_flare_azimut, 0, 1, true];
_press_implicit_y = 1-_press_implicit_x;
};
if ((_flare_azimut>90)and(_flare_azimut<180)) then {
_flare_azimut = _flare_azimut-90;
_press_implicit_x = linearConversion [0, 90,_flare_azimut, 1, 0, true];
_press_implicit_y = _press_implicit_x-1;
};
if ((_flare_azimut>180)and(_flare_azimut<270)) then {
_flare_azimut = _flare_azimut-180;
_press_implicit_x = linearConversion [0, 90,_flare_azimut, 0, -1, true];
_press_implicit_y = (-1*_press_implicit_x)-1;
};
if ((_flare_azimut>270)and(_flare_azimut<360)) then {
_flare_azimut = _flare_azimut-270;
_press_implicit_x = linearConversion [0, 90,_flare_azimut, -1, 0, true];
_press_implicit_y = 1+_press_implicit_x;
};
if (_type_roadflare=="static") then
{
_fum_flare = "#particlesource" createVehicleLocal getPosATL _al_roadflare;
_fum_flare setParticleCircle [0,[0,0,0]];
_fum_flare setParticleRandom [1,[0.1,0.1,0.1],[_press_implicit_x*0.5,_press_implicit_y*0.5,0.5],5,0.1,[1,0,0,0.1],0.5,0];
_fum_flare setParticleParams [["\A3\data_f\cl_basic", 1, 0, 1], "", "Billboard", 1,5,[0,0,0],[_press_implicit_x*1.5,_press_implicit_y*1.5,0.1],10,10,7.9,0.4,[0.5,1,3,5],[[1,0,0,1],[1,0.1,0.01,0.5],[0.1,0,0,0.7],[0,0,0,0]],[0.08],1,0,"","",_al_roadflare];
_fum_flare setDropInterval 0.05;
_al_spark = "#particlesource" createVehicleLocal getPosATL _al_roadflare;
_al_spark setParticleCircle [0,[0,0,0]];
_al_spark setParticleRandom [0.01,[0,0,0],[2,2,2],0,0.01,[1,1,1,1],1,0];
_al_spark setParticleParams [["\A3\data_f\cl_basic", 1, 0, 1], "", "Billboard",1,0.5,[0,0,0],[0,0,0],0,20,7.9,0,[0.015,0.015,0.015],[[1,1,1,1],[1,1,1,1],[1,1,1,0.5]],[0.08],1,0,"","", _al_roadflare];
_al_spark setDropInterval 0.01;
_al_throwable_light = "#lightpoint" createVehicle getPosATL _al_roadflare;
_al_throwable_light setLightAmbient _culoare_elem;
_al_throwable_light setLightColor _culoare_elem;
_al_throwable_light setLightBrightness al_Roadflare_brightness;
_al_throwable_light setLightUseFlare true;
_al_throwable_light setLightFlareSize 0.1;
_al_throwable_light setLightFlareMaxDistance 2000;
_al_throwable_light setLightAttenuation [/*start*/ 0.1, /*constant*/10, /*linear*/40, /*quadratic*/ 2000, /*hardlimitstart*/al_Roadflare_range/1.1,/* hardlimitend*/al_Roadflare_range];
_al_throwable_light setLightDayLight true;
sleep 0.1;
_al_throwable_light setpos (getPosATL _al_roadflare);
_flare_done = false;
_flare_life = 0 spawn {sleep al_Roadflare_lifetime-4};
_int_mic=0;
while {!_flare_done} do
{
_int_mic = 0.05 + random 0.1;
_brifct = [-10,10] call BIS_fnc_selectRandom;
sleep _int_mic;
_flare_brig = al_Roadflare_brightness + random _brifct;
_al_throwable_light setLightBrightness _flare_brig;
if (scriptDone _flare_life) then {_flare_done = true;};
};
// fum putin
_fum_flare setParticleParams [["\A3\data_f\cl_basic", 1, 0, 1], "", "Billboard", 1, 2, [0, 0, 0], [(rad _flare_azimut)/10,2-(rad _flare_azimut)/10, 0.5], 65, 10, 7.9, 0.2, [0.3, 5, 5], [[1, 1, 1, 0.05], [0.8, 0.8, 1, 0], [1, 1, 1, 0]], [0.08], 0.5, 0.3, "", "", _al_roadflare];
_fum_flare setDropInterval 1;
_al_spark setParticleParams [["\A3\data_f\cl_exp", 1, 0, 1], "", "Billboard", 1, 0.05, [0, 0, 0], [0, 0, 0], 0, 10, 7.9, 0.075, [0.03, 0.03, 0.03], [[1, 0.8, 0.8, 1], [0.25, 0.25, 0.25, 1], [1, 0.8, 0.7, 0.5]], [0.08], 1, 0, "", "", _al_roadflare];
_al_spark setDropInterval 0.1;
_flare_brig = 30;
while {_flare_brig>0} do {
_flare_brig = _flare_brig - 1;
_al_throwable_light setLightBrightness _flare_brig;
sleep 0.1;
};
deleteVehicle _al_throwable_light;
};
if (_type_roadflare=="roadster") then
{
_fum_flare = "#particlesource" createVehicleLocal getPosATL _al_roadflare;
_fum_flare setParticleCircle [0,[0,0,0]];
_fum_flare setParticleRandom [1,[0.1,0.1,0.1],[_press_implicit_x*0.5,_press_implicit_y*0.5,0.5],5,0.1,[1,0,0,0.1],0.5,0];
_fum_flare setParticleParams [["\A3\data_f\cl_basic", 1, 0, 1], "", "Billboard", 1,5,[0,0,0],[_press_implicit_x*1.5,_press_implicit_y*1.5,0.1],10,10,7.9,0.4,[0.5,1,3,5],[[1,0,0,1],[1,0.1,0.01,0.5],[0.1,0,0,0.7],[0,0,0,0]],[0.08],1,0,"","",_al_roadflare];
_fum_flare setDropInterval 0.05;
_al_spark = "#particlesource" createVehicleLocal getPosATL _al_roadflare;
_al_spark setParticleCircle [0,[0,0,0]];
_al_spark setParticleRandom [0.01,[0,0,0],[2,2,2],0,0.01,[1,1,1,1],1,0];
_al_spark setParticleParams [["\A3\data_f\cl_basic", 1, 0, 1], "", "Billboard",1,0.5,[0,0,0],[0,0,0],0,20,7.9,0,[0.015,0.015,0.015],[[1,1,1,1],[1,1,1,1],[1,1,1,0.5]],[0.08],1,0,"","", _al_roadflare];
_al_spark setDropInterval 0.01;
waitUntil {vectorMagnitude velocity _al_roadflare < 0.2};
_al_throwable_light = "#lightpoint" createVehicle getPosATL _al_roadflare;
_al_throwable_light setLightAmbient _culoare_elem;
_al_throwable_light setLightColor _culoare_elem;
_al_throwable_light setLightBrightness al_Roadflare_brightness;
_al_throwable_light setLightUseFlare true;
_al_throwable_light setLightFlareSize 0.1;
_al_throwable_light setLightFlareMaxDistance 2000;
_al_throwable_light setLightAttenuation [0.1,10,40,2000,al_Roadflare_range/1.1,al_Roadflare_range];
_al_throwable_light setLightDayLight true;
sleep 0.1;
_al_throwable_light attachTo [ _al_roadflare,[0, 0, 0.01]];
_flare_done = false;
_flare_life = 0 spawn {sleep al_Roadflare_lifetime-4;};
_int_mic=0;
while {!_flare_done} do {
_int_mic = 0.05 + random 0.1;
_brifct = [-10,10] call BIS_fnc_selectRandom;
sleep _int_mic;
_flare_brig = al_Roadflare_brightness + random _brifct;
_al_throwable_light setLightBrightness _flare_brig;
if (scriptDone _flare_life) then {_flare_done = true;};
};
detach _al_throwable_light;
// fum putin
_fum_flare setParticleParams [["\A3\data_f\cl_basic", 1, 0, 1], "", "Billboard", 1, 2, [0, 0, 0], [(rad _flare_azimut)/10,2-(rad _flare_azimut)/10, 0.5], 65, 10, 7.9, 0.2, [0.3, 5, 5], [[1, 1, 1, 0.05], [0.8, 0.8, 1, 0], [1, 1, 1, 0]], [0.08], 0.5, 0.3, "", "", _al_roadflare];
_fum_flare setDropInterval 1;
_al_spark setParticleParams [["\A3\data_f\cl_exp", 1, 0, 1], "", "Billboard", 1, 0.05, [0, 0, 0], [0, 0, 0], 0, 10, 7.9, 0.075, [0.03, 0.03, 0.03], [[1, 0.8, 0.8, 1], [0.25, 0.25, 0.25, 1], [1, 0.8, 0.7, 0.5]], [0.08], 1, 0, "", "", _al_roadflare];
_al_spark setDropInterval 0.1;
_flare_brig = 30;
while {_flare_brig>0} do {
_flare_brig = _flare_brig - 1;
_al_throwable_light setLightBrightness _flare_brig;
sleep 0.1;
};
deleteVehicle _al_throwable_light;
};
if (_type_roadflare=="chemlit") then
{
waitUntil {vectorMagnitude velocity _al_roadflare < 0.2};
if (al_chem) then {
_al_throwable_light = "#lightpoint" createVehicle getPosATL _al_roadflare;
_al_throwable_light setLightAmbient _culoare_elem;
_al_throwable_light setLightColor _culoare_elem;
_al_throwable_light setLightIntensity 50;
_al_throwable_light setLightBrightness 10;
_al_throwable_light setLightUseFlare false;
_al_throwable_light setLightFlareSize 0.5;
_al_throwable_light setLightFlareMaxDistance 2000;
_al_throwable_light setLightAttenuation [0.1,100,50,500,10,20];
_al_throwable_light setLightDayLight true;
_al_throwable_light attachTo [ _al_roadflare,[0, 0, 0.01]];
//sleep al_Roadflare_lifetime;
while {!isNull _al_roadflare} do {sleep 0.5};
deleteVehicle _al_throwable_light;
};
};// by ALIAS
// Roadflare DEMO
// Tutorial: https://www.youtube.com/user/aliascartoons
private ["_type_flare","_flare_sound_burn","_flare_set","_flare_sound_start","_al_color_flare","_al_throwable_light","_flare_brig","_inter_flare","_int_mic","_al_throwable","_type_throwable","_flare_life","_flare_done"];
if (!isServer) exitWith {};
_al_throwable = _this select 0;
_type_flare = _this select 1;
if (isNull _al_throwable) exitWith {};
if (!isNil {_al_throwable getVariable "is_on_road_flare"}) exitWith {};
_al_throwable setVariable ["is_on_road_flare",true,true];
if (_type_flare=="static") then
{
_al_color_flare = [1,0,0];
_flare_set = [1,2,3] call BIS_fnc_selectRandom;
if (_flare_set==1) then {_flare_sound_start="fl_start_1";_flare_sound_burn="fl_burn_1"};
if (_flare_set==2) then {_flare_sound_start="fl_start_2";_flare_sound_burn="fl_burn_2"};
if (_flare_set==3) then {_flare_sound_start="fl_start_3";_flare_sound_burn="fl_burn_3"};
[_al_throwable,[_flare_sound_start,100]] remoteExec ["say3d"];
[_al_throwable,_flare_sound_burn] spawn
{
_al_flare_voice = _this select 0;
_al_flare_arde = _this select 1;
sleep 0.5;
while {alive _al_flare_voice} do {
[_al_flare_voice,[_al_flare_arde,300]] remoteExec ["say3d"];
sleep 2+random 2 ;
};
};
[[_al_throwable,_type_flare,_al_color_flare],"AL_roadflare\al_roadflare_effect.sqf"] remoteExec ["execVM",0,true];
sleep (al_Roadflare_lifetime+6);
deleteVehicle _al_throwable;
};
_al_roadflare_check = false;
// you need to list in array bellow the class names for flares you want to alter
_type_throwable = ["Chemlight_blue","Chemlight_red","Chemlight_yellow","Chemlight_green",al_flare_obj];
if ((typeOf _al_throwable) in _type_throwable) then
{
switch (typeOf _al_throwable) do
{
case "Chemlight_blue": {if (al_chem) then {/*hint "Blue Chemlight";*/_al_color_flare = [0.2,0.2,1]};};
case "Chemlight_yellow": { if (al_chem) then {/*hint "Yellow Chemlight";*/_al_color_flare = [0.7,1,0]};};
case "Chemlight_green": { if (al_chem) then {/*hint "Green Chemlight";*/_al_color_flare = [0.2,1,0.2]};};
case al_flare_obj: {_al_color_flare = [1,0,0];_al_roadflare_check = true;};
};
};
if (_al_roadflare_check) then
{
_type_flare = "roadster";
_al_color_flare = [1,0,0];
_flare_set = [1,2,3] call BIS_fnc_selectRandom;
if (_flare_set==1) then {_flare_sound_start="fl_start_1";_flare_sound_burn="fl_burn_1"};
if (_flare_set==2) then {_flare_sound_start="fl_start_2";_flare_sound_burn="fl_burn_2"};
if (_flare_set==3) then {_flare_sound_start="fl_start_3";_flare_sound_burn="fl_burn_3"};
[_al_throwable,[_flare_sound_start,100]] remoteExec ["say3d"];
[_al_throwable,_flare_sound_burn] spawn {
_al_flare_voice = _this select 0;
_al_flare_arde = _this select 1;
sleep 0.5;
while {alive _al_flare_voice} do {
[_al_flare_voice,[_al_flare_arde,300]] remoteExec ["say3d"];
sleep 2+random 2 ;
};
};
[[_al_throwable,_type_flare,_al_color_flare],"AL_roadflare\al_roadflare_effect.sqf"] remoteExec ["execVM",0,true];
sleep (al_Roadflare_lifetime+6);
deleteVehicle _al_throwable;
};
if (!_al_roadflare_check) then
{
_type_flare = "chemlit";
[[_al_throwable,_type_flare,_al_color_flare],"AL_roadflare\al_roadflare_effect.sqf"] remoteExec ["execVM",0,true];
};
switch (side player) do {
case West:
{
player createDiaryRecord ["Diary", ["Credits","
THANK YOU!
Armaholic - for supporting the community since 2006
BIS - for an awesome platform
All script contributors - without you I would've never learned how to script
Tactical Cannon Fodder, B.w.S., Comrades in Arms and HellHounds communities - for welcoming me and testing
Big thank you to all users for support and feedback!
See the tutorial on my YT channel:
youtube.com/aliascartoons
Yours,
ALIAS
"]];
};
case east:
{
player createDiaryRecord ["Diary", ["Credits","
THANK YOU!
Armaholic - for supporting the community since 2006
BIS - for an awesome platform
All script contributors - without you I would've never learned how to script
Tactical Cannon Fodder, B.w.S., Comrades in Arms and HellHounds communities - for welcoming me and testing
Big thank you to all users for support and feedback!
See the tutorial on my YT channel:
youtube.com/aliascartoons
Yours,
ALIAS
"]];
};
case independent:
{
player createDiaryRecord ["Diary", ["Credits","
THANK YOU!
Armaholic - for supporting the community since 2006
BIS - for an awesome platform
All script contributors - without you I would've never learned how to script
Tactical Cannon Fodder, B.w.S., Comrades in Arms and HellHounds communities - for welcoming me and testing
Big thank you to all users for support and feedback!
See the tutorial on my YT channel:
youtube.com/aliascartoons
Yours,
ALIAS
"]];
};
case civilian:
{
player createDiaryRecord ["Diary", ["Credits","
THANK YOU!
Armaholic - for supporting the community since 2006
BIS - for an awesome platform
All script contributors - without you I would've never learned how to script
Tactical Cannon Fodder, B.w.S., Comrades in Arms and HellHounds communities - for welcoming me and testing
Big thank you to all users for support and feedback!
See the tutorial on my YT channel:
youtube.com/aliascartoons
Yours,
ALIAS
"]];
};
};// === MISSION OVERVIEW
overviewText = "Road Flare DEMO"; // mission summary
overviewPicture = "Img\Snapshot.jpg";
// === LOAD SCREEN
onLoadName = Road Flare DEMO;
author = ALIAS;
onLoadMission = Road Flare and Chemlights DEMO mission;
loadScreen = "Img\Overlay.jpg";
class CfgSounds
{
class fl_start_1
{
name = "fl_start_1";
sound[] = {"\sound\fl_start_1.ogg", 1, 1};
titles[] = {1, ""};
};
class fl_burn_1
{
name = "fl_burn_1";
sound[] = {"\sound\fl_burn_1.ogg", 1, 1};
titles[] = {1, ""};
};
class fl_start_2
{
name = "fl_start_2";
sound[] = {"\sound\fl_start_2.ogg", 1, 1};
titles[] = {1, ""};
};
class fl_burn_2
{
name = "fl_burn_2";
sound[] = {"\sound\fl_burn_2.ogg", 1, 1};
titles[] = {1, ""};
};
class fl_start_3
{
name = "fl_start_3";
sound[] = {"\sound\fl_start_3.ogg", 1, 1};
titles[] = {1, ""};
};
class fl_burn_3
{
name = "fl_burn_3";
sound[] = {"\sound\fl_burn_3.ogg", 1, 1};
titles[] = {1, ""};
};
}; JFIF H H C C Z d
@ ! "1AQ
#Ba2Rq$45Cbcs I !1A"Qa2Bq4RT#D$Sb5crs ? F"0D`#F"0D`#X̻zDDZ`32'eI=l<~wu2s4I)77(²)hc%?XfrWTNi\4ԑ(n8jOƮN?#MMo;۽>jS $қ7u^=z(T~E9Mqs7ϲ&