Dayz Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Loading...
Searching...
No Matches
pperhmp_lvl3.c
Go to the documentation of this file.
1class PPERequester_HeavyMetalPoisoning_3 extends PPERequester_GameplayBase
2{
3 const float WAVE_PROGRESS_MIN = 0;
4 const float WAVE_PROGRESS_MAX = Math.PI;
5 const float WAVE_AMPLITUDE_COEF = 0.7; //utilized values clamped to <-1,1> range, this affects the duration of plateau and steepness of change
6 const float WAVE_TILT = -0.12; //anything in the closed range of (1,-1), left to right. UNDEFINED for '0' value!
7
8 const float DISTORT_MIN = 0;
9 const float DISTORT_MAX = -0.8;
10
11 //const float PULSING_FREQUENCY = 1.0;
12
18
19 void SetInitialLenseOffset(float offsetAngle, float offsetDistance = 0.5)
20 {
21 m_LenseOffsetAngle = offsetAngle;
22 m_LenseOffsetDist = Math.Clamp(offsetDistance,0,1);
23 }
24
25 void SetEffectProgress(float progress) //0..1
26 {
30
34 float chromAbb = Math.AbsFloat(m_CurveValueClamped); //scale
35
36 float chromShiftR = 0.1;
37 float chromShiftG = 0;
38 float chromShiftB = 0.75;
39
40 float alpha01 = Math.Sin( -Math.PI_HALF + 7 * m_ProgressAngle) * 0.5 + 0.5;
41 vector colabA = "-1 -1 -0.85";
42 vector colabB = "0 0 0";
43 vector absim = vector.Lerp(colabA, colabB, alpha01);
44
45 array<float> color_mod = {absim[0], absim[1], absim[2], 1.0};
46
47 vector coloverA = "0 0 0";
48 vector coloverB = "0.25 0.9 0.1";
49 vector oversim = vector.Lerp(coloverA, coloverB, m_CurveValueClamped);
50
51 array<float> color_overlay = {oversim[0], oversim[1], oversim[2], 0.5};
52
61
63 }
64}
Definition enmath.c:7
Distort - PostProcessEffectType.Distort.
Definition ppedistort.c:3
static const int L_6_HMP
Definition ppedistort.c:21
static const int L_7_HMP
Definition ppedistort.c:22
static const int PARAM_CHROM_ABB_SHIFTR
Maximum value of chromatic abberation, 0 = disable - note that chrom. aberr depends on amount of dist...
Definition ppedistort.c:8
static const int PARAM_CHROM_ABB
Lens center Y direction (-1 = top, 0 = center, 1 = bottom).
Definition ppedistort.c:7
static const int PARAM_CHROM_ABB_SHIFTG
Chromatic abberation red channel shift magnitude. 0 = none.
Definition ppedistort.c:9
static const int PARAM_DISTORT
Definition ppedistort.c:4
static const int L_0_HMP
Distortion applied to imagine. 1 = all, 0 = none, applied only to ChromAbber.
Definition ppedistort.c:15
static const int PARAM_CHROM_ABB_SHIFTB
Chromatic abberation green channel shift magnitude. 0 = none, 1 = default.
Definition ppedistort.c:10
static const int L_3_HMP
Definition ppedistort.c:18
static const int L_4_HMP
Definition ppedistort.c:19
static const int PARAM_CHROM_COLOR_MOD
Chromatic abberation blue channel shift magnitude. 0 = none, 2 = default.
Definition ppedistort.c:11
static const int L_1_HMP
Definition ppedistort.c:16
static const int PARAM_CENTERX
Lens distortion magnitude, x > 0 = barrel distortion, x < 0 = pincushion distortion.
Definition ppedistort.c:5
static const int L_5_HMP
Definition ppedistort.c:20
static const int PARAM_CENTERY
Lens center X direction (-1 = left, 0 = center, 1 = right).
Definition ppedistort.c:6
static const int L_2_HMP
Definition ppedistort.c:17
Glow - PostProcessEffectType.Glow.
Definition ppeglow.c:8
static const int PARAM_COLORIZATIONCOLOR
Definition ppeglow.c:32
static const int L_23_HMP
Definition ppeglow.c:54
base, not to be used directly, would lead to layering collisions!
const float WAVE_PROGRESS_MAX
Definition pperhmp_lvl3.c:4
const float WAVE_PROGRESS_MIN
Definition pperhmp_lvl3.c:3
void SetInitialLenseOffset(float offsetAngle, float offsetDistance=0.5)
void SetEffectProgress(float progress)
const float WAVE_AMPLITUDE_COEF
Definition pperhmp_lvl3.c:5
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
static proto native vector Lerp(vector v1, vector v2, float t)
Lerp between two vectors.
PostProcessEffectType
Post-process effect type.
Definition enworld.c:72
static proto float Atan(float x)
Returns angle in radians from tangent.
static proto float Cos(float angle)
Returns cosinus of angle in radians.
static const float PI_HALF
Definition enmath.c:14
static proto float Clamp(float value, float min, float max)
Clamps 'value' to 'min' if it is lower than 'min', or to 'max' if it is higher than 'max'.
static const float PI
Definition enmath.c:12
static proto float Lerp(float a, float b, float time)
Linearly interpolates between 'a' and 'b' given 'time'.
static proto float AbsFloat(float f)
Returns absolute value.
static proto float Sin(float angle)
Returns sinus of angle in radians.
PPOperators
PP operators, specify operation between subsequent layers.
void SetTargetValueFloat(int mat_id, int param_idx, bool relative, float val, int priority_layer, int operator=PPOperators.ADD_RELATIVE)
void SetTargetValueColor(int mat_id, int param_idx, array< float > val, int priority_layer, int operator=PPOperators.ADD_RELATIVE)