Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
NoiseCinematicTrackModifier.c
Go to the documentation of this file.
2{
3 [Attribute(defvalue:"0.1", params:"0 inf", desc:"How big the movement will be")]
4 float Strength;
5
6 [Attribute(defvalue:"2", params:"0 inf", desc:"How quick the movement will be")]
7 float Speed;
8
9 [Attribute(defvalue:"0", desc:"Offset for starting time")]
10 float Offset;
11
12 //------------------------------------------------------------------------------------------------
13 override bool OnApplyModifierBool(float time, bool originalValue)
14 {
15 float t = Offset + time*Speed;
16 float noise = Math.PerlinNoise(t);
17
18 return noise > 0.0;
19 }
20
21 //------------------------------------------------------------------------------------------------
22 override int OnApplyModifierInt(float time, int originalValue)
23 {
24 float t = Offset + time*Speed;
25 float noise = Math.PerlinNoise(t);
26
27 return originalValue + Math.Round(noise*Strength);
28 }
29
30 //------------------------------------------------------------------------------------------------
31 override float OnApplyModifierFloat(float time, float originalValue)
32 {
33 float t = Offset + time*Speed;
34 float noise = Math.PerlinNoise(t);
35
36 return originalValue + noise*Strength;
37 }
38
39 //------------------------------------------------------------------------------------------------
40 override vector OnApplyModifierVector(float time, vector originalValue)
41 {
42 float t = Offset + time*Speed;
43
44 vector noise = Vector(
45 Math.PerlinNoise(t, 0, 0),
46 Math.PerlinNoise(0, t, 0),
47 Math.PerlinNoise(0, 0, t));
48
49 return originalValue + noise*Strength;
50 }
51};
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition Math.c:13
SCR_FieldOfViewSettings Attribute
proto native vector Vector(float x, float y, float z)