Jump to content
Shyjon

Vehicles Smoke Longer/Forever When Destroyed

Recommended Posts

This is how you can make vehicles smoke longer or forever. 

This waits until a vehicle is destroyed, and then places a smoke object at the position of the destroyed vehicle.  Use Spawn (https://community.bistudio.com/wiki/spawn) to run this if you need it on multiple vehicles.  This is an excellent substitute for the Smoke module in the ARMA 3 editor, which does not move.

 

FOR INFINITE SMOKE:

while {alive Car2} do {
 sleep 60; 
 if (!alive Car2) then {
  _smoker = "test_EmptyObjectForSmoke" createVehicle position Car2;
  _smoker attachTo [Car2, [0, 1.5, 0]];
  };
 };


FOR FINITE SMOKE ENDING RANDOMLY:

while {alive Car2} do {
 sleep 60; 
 if (!alive Car2) then {
  _smoker = "test_EmptyObjectForSmoke" createVehicle position Car2;
  _smoker attachTo [Car2, [0, 1.5, 0]];
   sleep (600 + (random 1200)); deleteVehicle _smoker;
  };
 };

 

  • Like 2

Share this post


Link to post
Share on other sites

appreciate the effort. So, let's say this code could be improved by EH "killed" usage or equivalent in MEH, MPEH...

 

  • Like 1

Share this post


Link to post
Share on other sites

This looks great for a large scale background battle.

But to make it seem less artificial I was wondering-
Where can I find the standard fire and smoke particle settings for an exploded vehicle?

Share this post


Link to post
Share on other sites

explosionEffect?  FuelExplosion?   I started poking around in those directions but it looked like it was going beyond my novice level of proficiency in a hurry. 

Share this post


Link to post
Share on other sites

@Melody_Mike I've used this in the past to create some pretty nice battlefield effects on wrecks (it was used as part of a larger system for randomly spawning wrecks/effects over an area):

private _smoke = "#particlesource" createVehicleLocal (getPos _vehicle);
_smoke setParticleClass (_effectSize select 0);
_smoke setPosASL _attachPos;
[_smoke,_vehicle] call BIS_fnc_attachToRelative;
_smoke setParticleFire [0.1,1.5,0.05];

private _fire = "#particlesource" createVehicleLocal (getPos _vehicle);
_fire setParticleClass (_effectSize select 1);
_fire setPosASL _attachPos;
[_fire,_vehicle] call BIS_fnc_attachToRelative;

private _light = "#lightpoint" createVehicleLocal (getPos _vehicle);
_light setLightBrightness 1.0;
_light setLightAmbient (_effectSize select 2);
_light setLightColor (_effectSize select 2);
_light setPosASL _attachPos;
[_light,_vehicle] call BIS_fnc_attachToRelative;

Where _vehicle was the wreck having the effect added, and _attachPos was the position I wanted the effect to be emitting from which obviously differs between vehicles. As for _effectSize, I was randomly selecting between these values:

["MediumDestructionSmoke","MediumDestructionFire",[0.2,0.09,0.014]]
- OR -
["BigDestructionSmoke","BigDestructionFire",[0.4,0.18,0.028]]

Hopefully this helps you out in some way, because I can't for the life of me remember where/how I got these, but at a guess it was somewhere deep within a config file.

Anyway, here is the results for the above:

https://steamcommunity.com/sharedfiles/filedetails/?id=2416052925
https://steamcommunity.com/sharedfiles/filedetails/?id=2416052945

  • Like 3

Share this post


Link to post
Share on other sites

Yes, thank you. The last part especially is what I was looking for.

I am aiming to "guide" the players towards the objective (a battlefield) with burning wreckages in the distance. But I don't know what values to put in the smoke effect modules. So my smoke plumes look more like someone drew graffiti in the sky with a fat marker. This should improve immersion.  

Share this post


Link to post
Share on other sites

Would it be difficult to make this into a mod ?  for all vehicles and planes....

It looks like a great solution for low-powered PCs (Blastcore is too heavy)

I don't have time ot figure out how to make this into a mod....any tips?
 

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

×