SejtanPL
Member-
Content Count
27 -
Joined
-
Last visited
-
Medals
-
Medals
-
Burning trees, grass, houses, particleEffects
SejtanPL replied to SejtanPL's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Leave this code in your init.sqf: BIS_fn_createFireEffect = { private["_effect","_pos","_fire","_smoke"]; private["_light","_brightness","_color","_ambient","_intensity","_attenuation"]; _pos = _this select 0; _effect = _this select 1; _fire = ""; _smoke = ""; _light = objNull; _color = [1,0.85,0.6]; _ambient = [1,0.3,0]; switch (_effect) do { case "FIRE_SMALL" : { _fire = "SmallDestructionFire"; _smoke = "SmallDestructionSmoke"; }; case "FIRE_MEDIUM" : { _fire = "MediumDestructionFire"; _smoke = "MediumDestructionSmoke"; _brightness = 1.0; _intensity = 400; _attenuation = [0,0,0,2]; }; case "FIRE_BIG" : { _fire = "BigDestructionFire"; _smoke = "BigDestructionSmoke"; _brightness = 1.0; _intensity = 1600; _attenuation = [0,0,0,1.6]; }; case "SMOKE_SMALL" : { _smoke = "SmallDestructionSmoke"; }; case "SMOKE_MEDIUM" : { _smoke = "MediumSmoke"; }; case "SMOKE_BIG" : { _smoke = "BigDestructionSmoke"; }; }; if (_fire != "") then { _eFire = "#particlesource" createVehicleLocal _pos; _eFire setParticleClass _fire; _eFire setPosATL _pos; }; if (_smoke != "") then { _eSmoke = "#particlesource" createVehicleLocal _pos; _eSmoke setParticleClass _smoke; _eSmoke setPosATL _pos; }; //create lightsource if (_effect in ["FIRE_BIG","FIRE_MEDIUM"]) then { _pos = [_pos select 0,_pos select 1,(_pos select 2)+1]; _light = createVehicle ["#lightpoint", _pos, [], 0, "CAN_COLLIDE"]; _light setPosATL _pos; _light setLightBrightness _brightness; _light setLightColor _color; _light setLightAmbient _ambient; _light setLightIntensity _intensity; _light setLightAttenuation _attenuation; _light setLightDayLight false; }; }; and type this in the trigger in od act: [getPos w1, "FIRE_BIG"] call BIS_fn_createFireEffect; w1 - name of the object that you want to burn "FIRE_BIG" - the type of fire or smoke -
Or use my method, which is also based on a script from the campaign and works with all objects, not just with _helperClass.
-
Assign a script to each destroyed vehicle
SejtanPL replied to SejtanPL's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I make some demo mission. I hope it will be helpful. -
Burning trees, grass, houses, particleEffects
SejtanPL replied to SejtanPL's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hi again :) I make some demo mission. I hope it will be helpful :) -
Assign a script to each destroyed vehicle
SejtanPL replied to SejtanPL's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I'm glad to be helpful. The script works pretty well, but not without bugs. In place of "SMOKE_BIG", you can give "SMOKE_MEDIUM", "SMOKE_SMALL" or "FIRE_BIG", "FIRE_MEDIUM", "FIRE_SMALL". When you use the "FIRE_BIG" for example, fire will burn all the time but sound will be heard only by about 2.5 minutes (the length of the recorded sound). Unfortunately, burning time is different for types of vehicles. Sometimes you can hear the flames, although the flames have extinguished. On the contrary ... the fire still burning, and the sound has faded ... I also noticed that when at one time will be destroyed more vehicles, not all sound comes. As far as the visuals, everything seems to be fine ;) I must say that without help, roy86 who helped me with the function responsible for burning vehicles, Killzone_Kid tutorial and help MulleDK19, the script probably would not exist :P Ones again sorry for my English. I use Google Translate to communicate with you :P -
Assign a script to each destroyed vehicle
SejtanPL replied to SejtanPL's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks a lot MulleDK19! :bounce3: I modified the script a little bit and eliminated all of the vehicles in the water. Now it's looks like this: init.sqf BIS_fn_createFireEffect = { private ["_effect","_pos","_fire","_smoke"]; private ["_light","_brightness","_color","_ambient","_intensity","_attenuation"]; _pos = _this select 0; _effect = _this select 1; _fire = ""; _smoke = ""; _light = objNull; _color = [1,0.85,0.6]; _ambient = [1,0.3,0]; switch (_effect) do { case "FIRE_SMALL" : { _fire = "SmallDestructionFire"; _smoke = "SmallDestructionSmoke"; _brightness = 1.0; _intensity = 10; _attenuation = [0,0,0,1]; }; case "FIRE_MEDIUM" : { _fire = "MediumDestructionFire"; _smoke = "MediumDestructionSmoke"; _brightness = 1.0; _intensity = 400; _attenuation = [0,0,0,2]; }; case "FIRE_BIG" : { _fire = "BigDestructionFire"; _smoke = "BigDestructionSmoke"; _brightness = 1.0; _intensity = 1600; _attenuation = [0,0,0,1.6]; }; case "SMOKE_SMALL" : { _smoke = "SmallDestructionSmoke"; }; case "SMOKE_MEDIUM" : { _smoke = "MediumSmoke"; }; case "SMOKE_BIG" : { _smoke = "BigDestructionSmoke"; }; }; if (_fire != "") then { _eFire = "#particlesource" createVehicleLocal _pos; _eFire setParticleClass _fire; _eFire setPosATL _pos; }; if (_smoke != "") then { _eSmoke = "#particlesource" createVehicleLocal _pos; _eSmoke setParticleClass _smoke; _eSmoke setPosATL _pos; }; //create lightsource if (_effect in ["FIRE_BIG", "FIRE_MEDIUM", "FIRE_SMALL"]) then { _pos = [_pos select 0,_pos select 1,(_pos select 2)+1]; _light = createVehicle ["#lightpoint", _pos, [], 0, "CAN_COLLIDE"]; _light setPosATL _pos; _light setLightBrightness _brightness; _light setLightColor _color; _light setLightAmbient _ambient; _light setLightIntensity _intensity; _light setLightAttenuation _attenuation; _light setLightDayLight false; }; }; MISSION_ROOT = call { private "_arr"; _arr = toArray str missionConfigFile; _arr resize (count _arr - 15); toString _arr }; { _x addEventHandler ["Killed", {(_this select 0) execVM "effect.sqf";}]; } forEach vehicles; effect.sqf private ["_veh"]; _veh = _this; _isWater = surfaceIsWater position _veh; waitUntil {isTouchingGround _veh}; if (speed _veh == 0 || !_isWater) then { playSound3D [MISSION_ROOT + "sounds\fire01.wss", _veh, false, getPosASL _veh, 10, 1, 50]; sleep 120; [getPosASL _veh, "SMOKE_BIG"] call BIS_fn_createFireEffect; }; For proper operation requires some burning fire sound. I use THIS after a little modification. ;) -
Assign a script to each destroyed vehicle
SejtanPL replied to SejtanPL's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Error, undefined variable in the expression. Screen EDIT: I changed allVehicles on vehicles and now it's works. One more question... how to exclude boats from the script? burning boat under the water would look weird :p -
Assign a script to each destroyed vehicle
SejtanPL posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Welcome. I would like to add some own effects (never ending smoke :P or burning vehicle sounds) to each destroyed vehicle in the mission. And here is the problem, because I don`t know how to assign the script for each destroyed vehicle. Is it possible to achieve the desired result? Sorry for my english as usual :P -
Burning trees, grass, houses, particleEffects
SejtanPL replied to SejtanPL's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks a lot. It works, but not perfectly. When I set "FIRE_BIG" on some height, smoke coming out from the ground, under the fire. Look the picture. Smoke from FIRE_SMALL and FIRE_MEDIUM is ok. -
Burning trees, grass, houses, particleEffects
SejtanPL replied to SejtanPL's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Yes Iceman... You're right, I made a mistake ... I told you almost the whole story :j: But now, as I have already apologized and removed the spoilers, please shut up if you have nothing to say on this topic. -
Burning trees, grass, houses, particleEffects
SejtanPL replied to SejtanPL's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Done. -
Burning trees, grass, houses, particleEffects
SejtanPL replied to SejtanPL's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Ups... Sorry... I did't think about it :/ -
Burning trees, grass, houses, particleEffects
SejtanPL posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hi all :) I think I found in the campaign files a script responsible for burning environment: [] spawn { sleep 0.01; private["_fn_createEffect"]; _fn_createEffect = { private["_effect","_pos","_fire","_smoke"]; private["_light","_brightness","_color","_ambient","_intensity","_attenuation"]; //["[PARTICLE EFFECT CREATED]: %1",_this] call BIS_fnc_logFormat; _pos = _this select 0; _effect = _this select 1; _fire = ""; _smoke = ""; _light = objNull; /* _color = [1,0.85,0.6]; _ambient = [1,0.45,3]; */ _color = [1,0.85,0.6]; _ambient = [1,0.3,0]; switch (_effect) do { case "FIRE_SMALL": { _fire = "SmallDestructionFire"; _smoke = "SmallDestructionSmoke"; }; case "FIRE_MEDIUM": { _fire = "MediumDestructionFire"; _smoke = "MediumDestructionSmoke"; _brightness = 1.0; //_color = [1,0.85,0.6]; //_ambient = [1,0.3,0]; _intensity = 400; _attenuation = [0,0,0,2]; }; case "FIRE_BIG": { _fire = "BigDestructionFire"; _smoke = "BigDestructionSmoke"; _brightness = 1.0; //_color = [1,0.85,0.6]; //_ambient = [1,0.45,3]; _intensity = 1600; _attenuation = [0,0,0,1.6]; }; case "SMOKE_SMALL": { _smoke = "SmallDestructionSmoke"; }; case "SMOKE_MEDIUM": { _smoke = "MediumSmoke"; }; case "SMOKE_BIG": { _smoke = "BigDestructionSmoke"; }; }; if (_fire != "") then { _eFire = "#particlesource" createVehicleLocal _pos; _eFire setParticleClass _fire; _eFire setPosATL _pos; }; if (_smoke != "") then { _eSmoke = "#particlesource" createVehicleLocal _pos; _eSmoke setParticleClass _smoke; _eSmoke setPosATL _pos; }; //create lightsource if (_effect in ["FIRE_BIG","FIRE_MEDIUM"]) then { _pos = [_pos select 0,_pos select 1,(_pos select 2)+1]; _light = createVehicle ["#lightpoint", _pos, [], 0, "CAN_COLLIDE"]; _light setPosATL _pos; _light setLightBrightness _brightness; _light setLightColor _color; _light setLightAmbient _ambient; _light setLightIntensity _intensity; _light setLightAttenuation _attenuation; _light setLightDayLight false; }; }; #define FIRE_SMALL "Sign_Pointer_Yellow_F" #define FIRE_MEDIUM "Sign_Arrow_Large_Cyan_F" #define FIRE_BIG "Sign_Arrow_Large_Pink_F" #define SMOKE_SMALL "Sign_Pointer_Green_F" #define SMOKE_MEDIUM "Sign_Pointer_Blue_F" #define SMOKE_BIG "Sign_Arrow_Large_Blue_F" private["_helperClass","_effectType"]; { _helperClass = _x select 0; _effectType = _x select 1; { [getPosATL _x,_effectType] call _fn_createEffect; } forEach (allMissionObjects _helperClass); } forEach [ [FIRE_SMALL,"FIRE_SMALL"], [FIRE_MEDIUM,"FIRE_MEDIUM"], [FIRE_BIG,"FIRE_BIG"], [sMOKE_SMALL,"SMOKE_SMALL"], [sMOKE_MEDIUM,"SMOKE_MEDIUM"], [sMOKE_BIG,"SMOKE_BIG"] ]; }; How can I use it? Regular n = [pos1, "FIRE_BIG"] execVM "my_script.sqf" doesn't work. Sorry for my poor english :icon_rolleyes: -
Thank you :) This is what I was looking for ;)
-
Is there any way to create a uniform and / or other items, vests in a backpacks, or on ground that can be used? I'm searched forum but, I did not find answers... Sorry for my english. :P