Jump to content
Taylor1984

More smoke when bullet hits the ground

Recommended Posts

Hi

 

Is there a way to add more smoke when bullets hit the ground?

Thanks

Share this post


Link to post
Share on other sites
1 hour ago, sarogahtyp said:

i guess

 

I will guess also !

Maybe this can be done easier from the weapon or world configs ?

 

Share this post


Link to post
Share on other sites

something like this should work (for player)

 

player addEventHandler ["fired", {
  _this spawn {
  private _pos = [0,0,0];
  private _result = [];
  _project = _this select 6;
  if ((_this select 1) == primaryWeapon player) then {
    _cursor = if (isnull cursorObject) then [{(positionCameraToWorld [0,0,player distance screenToWorld [0.5,0.5]])},{cursorobject}];
    waitUntil {
      if ((_project distanceSqr _cursor) <0.01 or isNull _project) exitWith {true};
      _pos = getPosATL _project;
  	  if (isnil "_pos") exitWith {};
      false
    };
    if (!(_pos isEqualTo [0,0,0])) then {
      _project = "#particlesource" createVehicle _pos;
      _project setParticleClass "ImpactSmoke"};
      _project setPosATL _pos;
      _project attachTo [cursorObject];
      uiSleep 1;
      _emitterArray = if (!isnull _project) then [{[]},{_project getVariable "effects"}];
      {deleteVehicle _x} forEach _emitterArray;
      deleteVehicle _project;
    };
  };
}];

For MP, you probably need to remoteExec the effect. (not tested).

  • Like 4

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

×