Jump to content
calamity

Teargas smoke

Recommended Posts

1 hour ago, chi said:

Thanks Matt. Long time. U still at the beach? We just left from their on vacation.

Nah bro I'm stationed in northern Virginia now.  Going to NC soon

Share this post


Link to post
Share on other sites

I haven't read this entire thread so Im not sure if this was pointed out, but using just the 

"SmokeShell"

class name will make every smoke grenade, regardless of color, have the exact same effect. You can't use a script that gives just SmokeShell an effect without also giving that to every other type of smoke grenade. You have to specify color.  I have a custom gas grenade script on my server that Matt started and Halvhjearne improved a couple of years ago and we ran into that exact problem. 

 

Also "G_40mm_SmokeGreen" is the correct classname for the 40mm smoke grenades. Basically any m203 smoke grenade firing weapon.

Share this post


Link to post
Share on other sites

How about this matt. Code may look familiar to ya, lol.  Wondering how to clear the massive amount of ammo that spawns with the usvehiclebox. I want to create an array it chooses from to fill the box. Hope you have the time. Thanks again man. If you come interstate 95 into NC i'll buy ya some lunch!!

Spoiler

                //MattL's carepackage script (edited by dgx) 
                _position = [((_playerpos select 0) + _cor_y),((_playerpos select 1) + _cor_x),200];
                waitUntil { (_aircraft distance _position < 50) };
                _aircraftpos = [_aircraft] call FNC_GetPos;
                _chute = createVehicle ["ParachuteMediumEast", _aircraftpos, [], 0, "FLY"];
                _chutePos = getPos _chute;
                _FlyingSupplyBox = createVehicle ["USVehicleBox", _chutePos, [], 0, "FLY"];
                _FlyingSupplyBox attachTo [_chute, [0,0,3]];
                _FlyingSupplyBox setVariable ["permaLoot",true];
                _FlyingSupplyBox setVariable ["ObjectID", ""];
                _FlyingSupplyBox addEventHandler ["handleDamage", {false}];
                _chute setVariable ["ObjectID", ""];
                _smoke = "SmokeShellYellow" createVehicle (getPos _FlyingSupplyBox);
                _smoke attachTo [_FlyingSupplyBox, [0,0,0]];
                //_flare = "F_40mm_white" createVehicle  (getPos _FlyingSupplyBox);
                //_flare attachTo [_FlyingSupplyBox, [0,0,0]];
                _var = floor((random 2) + 1);
 
 
 
                while {getPos _FlyingSupplyBox select 2 > 4} do
                {
                    _chute SetVelocity [0,0,-5];
                    uiSleep 0.1;
                };
                detach _FlyingSupplyBox;
                while {getPos _FlyingSupplyBox select 2 > 0} do {
                    _FlyingSupplyBox setPos [getPos _FlyingSupplyBox select 0, getPos _FlyingSupplyBox select 1, (getPos _FlyingSupplyBox select 2) - .25]
                };
                deleteVehicle _chute;
                _posATL = getPosATL _FlyingSupplyBox;
                deleteVehicle _FlyingSupplyBox;
                _SupplyBox = "USVehicleBox" createVehicle _posATL;
                _SupplyBox setVariable ["permaLoot",true];
                _SupplyBox enableSimulation false;
                //MattL's Carepackages script end
                
                //supply_drop.sqf code
                if (DZE_MissionLootTable) then {
                    dgx_itemTypes = [] + getArray (missionConfigFile >> "CfgBuildingLoot" >> "MassGrave" >> "lootType");
                    } else {
                    dgx_itemTypes = [] + getArray (configFile >> "CfgBuildingLoot" >> "MassGrave" >> "lootType");
                    };
                _CBLBase = dayz_CBLBase find (toLower("MassGrave"));
                _weights = dayz_CBLChances select _CBLBase;
                _cntWeights = count _weights;
                _num = (round(random 8)) + 4;
                for "_x" from 1 to _num do {
                //create loot
                _maxLootRadius = (random 4) + 4;
                _lootPos = [_posATL, _maxLootRadius, random 360] call BIS_fnc_relPos;
                _index1 = floor(random _cntWeights);
                _index2 = _weights select _index1;
                _itemType = dgx_itemTypes select _index2;
                [_itemType select 0, _itemType select 1, _lootPos, 5] call spawn_loot;
                };
 
                // ReammoBox is preferred parent class here, as WeaponHolder wouldn't match MedBox0 && other such items.
                _nearby = _position nearObjects ["ReammoBox", sizeOf("USVehicleBox")];
                {
                _x setVariable ["permaLoot",true];
                } count _nearBy;
                
                //supply_drop.sqf code end

Share this post


Link to post
Share on other sites
29 minutes ago, chi said:

How about this matt. Code may look familiar to ya, lol.  Wondering how to clear the massive amount of ammo that spawns with the usvehiclebox. I want to create an array it chooses from to fill the box. Hope you have the time. Thanks again man. If you come interstate 95 into NC i'll buy ya some lunch!!

  Reveal hidden contents

                //MattL's carepackage script (edited by dgx) 
                _position = [((_playerpos select 0) + _cor_y),((_playerpos select 1) + _cor_x),200];
                waitUntil { (_aircraft distance _position < 50) };
                _aircraftpos = [_aircraft] call FNC_GetPos;
                _chute = createVehicle ["ParachuteMediumEast", _aircraftpos, [], 0, "FLY"];
                _chutePos = getPos _chute;
                _FlyingSupplyBox = createVehicle ["USVehicleBox", _chutePos, [], 0, "FLY"];
                _FlyingSupplyBox attachTo [_chute, [0,0,3]];
                _FlyingSupplyBox setVariable ["permaLoot",true];
                _FlyingSupplyBox setVariable ["ObjectID", ""];
                _FlyingSupplyBox addEventHandler ["handleDamage", {false}];
                _chute setVariable ["ObjectID", ""];
                _smoke = "SmokeShellYellow" createVehicle (getPos _FlyingSupplyBox);
                _smoke attachTo [_FlyingSupplyBox, [0,0,0]];
                //_flare = "F_40mm_white" createVehicle  (getPos _FlyingSupplyBox);
                //_flare attachTo [_FlyingSupplyBox, [0,0,0]];
                _var = floor((random 2) + 1);
 
 
 
                while {getPos _FlyingSupplyBox select 2 > 4} do
                {
                    _chute SetVelocity [0,0,-5];
                    uiSleep 0.1;
                };
                detach _FlyingSupplyBox;
                while {getPos _FlyingSupplyBox select 2 > 0} do {
                    _FlyingSupplyBox setPos [getPos _FlyingSupplyBox select 0, getPos _FlyingSupplyBox select 1, (getPos _FlyingSupplyBox select 2) - .25]
                };
                deleteVehicle _chute;
                _posATL = getPosATL _FlyingSupplyBox;
                deleteVehicle _FlyingSupplyBox;
                _SupplyBox = "USVehicleBox" createVehicle _posATL;
                _SupplyBox setVariable ["permaLoot",true];
                _SupplyBox enableSimulation false;
                //MattL's Carepackages script end
                
                //supply_drop.sqf code
                if (DZE_MissionLootTable) then {
                    dgx_itemTypes = [] + getArray (missionConfigFile >> "CfgBuildingLoot" >> "MassGrave" >> "lootType");
                    } else {
                    dgx_itemTypes = [] + getArray (configFile >> "CfgBuildingLoot" >> "MassGrave" >> "lootType");
                    };
                _CBLBase = dayz_CBLBase find (toLower("MassGrave"));
                _weights = dayz_CBLChances select _CBLBase;
                _cntWeights = count _weights;
                _num = (round(random 8)) + 4;
                for "_x" from 1 to _num do {
                //create loot
                _maxLootRadius = (random 4) + 4;
                _lootPos = [_posATL, _maxLootRadius, random 360] call BIS_fnc_relPos;
                _index1 = floor(random _cntWeights);
                _index2 = _weights select _index1;
                _itemType = dgx_itemTypes select _index2;
                [_itemType select 0, _itemType select 1, _lootPos, 5] call spawn_loot;
                };
 
                // ReammoBox is preferred parent class here, as WeaponHolder wouldn't match MedBox0 && other such items.
                _nearby = _position nearObjects ["ReammoBox", sizeOf("USVehicleBox")];
                {
                _x setVariable ["permaLoot",true];
                } count _nearBy;
                
                //supply_drop.sqf code end

I was in pasquotank county earlier today. After you spawn the box you should be able to use like clearvehiclecargo or something like that. I havnt actually sat down and looked at code since I joined the navy so it would take me a hot minute to get the right variables and commands but what you want can be done 

Share this post


Link to post
Share on other sites
8 minutes ago, chi said:

Roger that. Doing good things by joining the navy. o7 Thanks!

Yeah so a few lines with removeWeapons removeMagazines and removeItems or some such should be sufficient enough to clear it out. I'm on my phone so I can't really do much to help other than help research and answer questions. And yeah man, I love it so far. I'm a corpsman up at MCB Quantico, it's a load of fun.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Advertisement
  • Supporters
  • Discord

×
×
  • Create New...