Skip to content

Commit ada8bb3

Browse files
committed
Updated Gas particle Effects
1 parent 1a24654 commit ada8bb3

2 files changed

Lines changed: 69 additions & 22 deletions

File tree

addons/chemical/CfgCloudlets.hpp

Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class CfgCloudlets {
6464
};
6565

6666
class GVAR(Toxic_Gas_Particles): Default {
67-
interval = 0.01;
67+
interval = 0.05;
6868
circleRadius = 0;
6969
circleVelocity[] = {0,0,0};
7070
particleFSNtieth = 16;
@@ -75,28 +75,28 @@ class CfgCloudlets {
7575
particleShape = "\A3\data_f\ParticleEffects\Universal\Universal.p3d";
7676
particleType = "Billboard";
7777
timerPeriod = 1;
78-
lifeTime = 20;
78+
lifeTime = 10;
7979
moveVelocity[] = {0,0,0};
8080
rotationVelocity = 1;
8181
weight = 100;
8282
volume = 1;
8383
rubbing = 0.01;
84-
size[] = {0.1,2,0};
84+
size[] = {0.3,4,0};
8585
color[] =
8686
{
87-
{0.3,0.3,0.3,0},
88-
{0.4,0.4,0.4,0.2},
89-
{0.371, 0.465, 0.044,0.3},
90-
{0.471, 0.565, 0.084,0.2},
91-
{0.671, 0.765, 0.184,0.1},
92-
{0.671, 0.765, 0.184,0}
87+
{0.3, 0.3, 0.3, 0},
88+
{0.4, 0.45, 0.1, 0.25},
89+
{0.45, 0.55, 0.1, 0.4},
90+
{0.5, 0.6, 0.12, 0.35},
91+
{0.55, 0.65, 0.15, 0.2},
92+
{0.6, 0.7, 0.17, 0}
9393
};
9494
animationSpeed[] = {0.5,0.3};
9595
randomDirectionPeriod = 1;
9696
randomDirectionIntensity = 0.04;
9797
onTimerScript = "";
9898
beforeDestroyScript = "";
99-
lifeTimeVar = 10;
99+
lifeTimeVar = 5;
100100
positionVar[] = {0,0,0};
101101
moveVelocityVar[] = {0.5,0,0.5};
102102
rotationVelocityVar = 10;
@@ -116,6 +116,24 @@ class CfgCloudlets {
116116
ignoreWind = 1;
117117
};
118118

119+
class GVAR(Toxic_Gas_Wisps): GVAR(Toxic_Gas_Particles) {
120+
interval = 0.1;
121+
lifeTime = 6;
122+
lifeTimeVar = 3;
123+
size[] = {0.1, 1.5, 0};
124+
moveVelocity[] = {0, 0, 0.3};
125+
moveVelocityVar[] = {0.3, 0.3, 0.2};
126+
onSurface = 0;
127+
rubbing = 0.05;
128+
color[] =
129+
{
130+
{0.4, 0.5, 0.1, 0},
131+
{0.45, 0.55, 0.12, 0.15},
132+
{0.5, 0.6, 0.15, 0.1},
133+
{0.5, 0.6, 0.15, 0}
134+
};
135+
};
136+
119137
class KAT_CAS_GAS_FX: Default {
120138
interval = 0.03;
121139
circleRadius = 0;

addons/chemical/XEH_postInit.sqf

Lines changed: 41 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -58,20 +58,49 @@ GVAR(clientParticles) = createHashMap;
5858
if (_netId in GVAR(clientParticles)) exitWith {}; // idempotency guard
5959

6060
private _sourcePos = getPosATL _gasLogic;
61-
private _particleObjectAmount = (_radius / 10) max 1;
6261
private _particleObjects = [];
6362

64-
for "_i" from 0 to _particleObjectAmount do {
65-
private _particleSource = "#particlesource" createVehicleLocal _sourcePos;
66-
_particleSource setParticleClass QGVAR(Toxic_Gas_Particles);
67-
if (_i == 0) then {
68-
_particleSource setParticleCircle [1, [0,0,0]];
69-
} else {
70-
_particleSource setParticleCircle [_i * 10, [0,0,0]];
71-
};
72-
_particleSource attachTo [_gasLogic, [0,0,0]];
73-
_particleObjects pushBack _particleSource;
74-
};
63+
// Layer 1: Ground carpet — bulk mass, area-fill via setParticleRandom
64+
private _carpet = "#particlesource" createVehicleLocal _sourcePos;
65+
_carpet setParticleClass QGVAR(Toxic_Gas_Particles);
66+
_carpet setParticleCircle [0, [0, 0, 0]];
67+
_carpet setParticleRandom [
68+
2,
69+
[_radius, _radius, 0.3],
70+
[0.3, 0.3, 0.05],
71+
1, 0.3, [0.03, 0.03, 0.03, 0.1], 0, 0, 360
72+
];
73+
_carpet setDropInterval 0.0035;
74+
_carpet attachTo [_gasLogic, [0, 0, 0]];
75+
_particleObjects pushBack _carpet;
76+
77+
// Layer 2: Drifting wisps — volumetric body with vertical lift
78+
private _wisps = "#particlesource" createVehicleLocal _sourcePos;
79+
_wisps setParticleClass QGVAR(Toxic_Gas_Wisps);
80+
_wisps setParticleCircle [0, [0, 0, 0]];
81+
_wisps setParticleRandom [
82+
1,
83+
[_radius * 0.7, _radius * 0.7, 0.5],
84+
[0.2, 0.2, 0.3],
85+
1, 0.3, [0, 0, 0, 0.05], 0, 0, 360
86+
];
87+
_wisps setDropInterval 0.02;
88+
_wisps attachTo [_gasLogic, [0, 0, 0]];
89+
_particleObjects pushBack _wisps;
90+
91+
// Layer 3: Perimeter creep — circle emission with slight inward velocity
92+
private _creep = "#particlesource" createVehicleLocal _sourcePos;
93+
_creep setParticleClass QGVAR(Toxic_Gas_Particles);
94+
_creep setParticleCircle [_radius * 0.95, [-0.4, -0.4, 0]];
95+
_creep setParticleRandom [
96+
2,
97+
[1, 1, 0.2],
98+
[0.2, 0.2, 0.05],
99+
1, 0.2, [0, 0, 0, 0.1], 0, 0, 360
100+
];
101+
_creep setDropInterval 0.025;
102+
_creep attachTo [_gasLogic, [0, 0, 0]];
103+
_particleObjects pushBack _creep;
75104

76105
GVAR(clientParticles) set [_netId, _particleObjects];
77106
}] call CBA_fnc_addEventHandler;

0 commit comments

Comments
 (0)