Jump to content
Sign in to follow this  
1para{god-father}

How to change smoke on AI

Recommended Posts

I am creating a group as below but how can I change the smoke so they all carry a random Smoke color ?

_blockers = [getPos  _roadpos, EAST, (configFile >> "CfgGroups" >> "EAST" >> "INS" >> "Infantry" >> "INS_InfSquad")] call BIS_fnc_spawnGroup;

Thanks

Share this post


Link to post
Share on other sites

I haven't tested it but it should do something.

//null=[where] execvm "smokes.sqf"

_smokesA = ["SmokeShell","SmokeShellYellow","SmokeShellRed","SmokeShellGreen","SmokeShellPurple","SmokeShellBlue","SmokeShellOrange"];

_roadpos = _this select 0;// location

_blockers = [getPos  _roadpos, EAST, (configFile >> "CfgGroups" >> "EAST" >> "INS" >> "Infantry" >> "INS_InfSquad")] call BIS_fnc_spawnGroup;

{
_temp = _x;
_magsA = magazines _temp;  //make an array of existing smoke shells
{         
  if (_x isKindOf "SmokeShell") then      {
          _temp removeMagazine _x; //remove existing smoke shells   
                _temp addmagazine (_smokesA select (round(random 6)));// add random coloured smokeshells
               };  
                  } forEach _magsA;
                  } foreach units _blockers;

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  

×