DayZ 1.24
Loading...
Searching...
No Matches
BulletHitReaction.c
Go to the documentation of this file.
2{
3 const float ALPHA_MIN = 0;
4 const float ALPHA_MAX = 1;
9
11 {
12 m_HitDuration = 0.10;
13 m_BreakPoint = 0.05;
15 //Print("=====================================================");
16 //Print("=====================================================");
17 }
18
20 {
22 }
23
24 void Update(float deltatime)
25 {
26 float value;
27
30 else
31 {
33 value = 1 - tmp_value;
34 }
36 value = Math.Clamp(value, 0, 1);
38 //Print(val);
39 m_Requester.SetHitIntensity(val);
40
42 delete this;
43 }
44
45}
46
47class EffectRadial
48{
49
51 float m_Divisor = 16;
52 float m_Duration = 0.6;
54
55 void EffectRadial(Param param1, Param param2)
56 {
57 if (param1)
58 {
60 if (p1)
61 {
62 m_Divisor = p1.param1;
63 m_Duration = p1.param2;
64 }
65 }
66
67 if (Class.CastTo(m_PPERequester, PPERequesterBank.GetRequester(PPERequesterBank.REQ_PAINBLUR)))
68 m_PPERequester.Start();
69 }
70
72 {
74 m_PPERequester.SetRadialBlur(0, 0, 0, 0);
75 }
76
77 void Update(float deltatime)
78 {
79
81 float value = 1 - Easing.EaseInQuart(time);
82 float strenght = value / m_Divisor; //The divisor matches the ease curve used
83
85 m_PPERequester.SetRadialBlur(strenght, strenght, 1 - value, 1 - value);
86
87
90 delete this;
91 }
92}
void ~EffectRadial()
void EffectRadial(Param param1, Param param2)
float m_Divisor
PPERequester_PainBlur m_PPERequester
float m_Duration
class DamageDealtEffect m_TimeActive
Super root of all classes in Enforce script.
Definition EnScript.c:11
void Update(float deltatime)
PPERequester_HealthHitReaction m_Requester
Input value between 0 and 1, returns value adjusted by easing, no automatic clamping of input(do your...
Definition Easing.c:3
static float EaseInQuart(float t)
Definition Easing.c:56
Definition EnMath.c:7
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
Definition param.c:12
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
static proto float Lerp(float a, float b, float time)
Linearly interpolates between 'a' and 'b' given 'time'.
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 proto float InverseLerp(float a, float b, float value)
Calculates the linear value that produces the interpolant value within the range [a,...
proto native volatile void Update()