Arma Reforger Explorer
1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Toggle main menu visibility
Loading...
Searching...
No Matches
SCR_BayonetComponent.c
Go to the documentation of this file.
1
class
SCR_BayonetComponentClass
:
ScriptComponentClass
2
{
3
}
4
5
class
SCR_BayonetComponent :
ScriptComponent
6
{
8
protected
const
int
BLOOD_STEP_SIZE
= 10;
9
protected
const
float
MAX_BLOOD_LEVEL
= 255.0;
10
11
protected
float
m_fBloodStainLevel
= 0;
12
13
//------------------------------------------------------------------------------------------------
15
void
AddBloodToBayonet
()
16
{
17
Rpc_AddBloodToBayonet
();
18
Rpc
(
Rpc_AddBloodToBayonet
);
19
}
20
21
//------------------------------------------------------------------------------------------------
22
[
RplRpc
(
RplChannel
.Reliable,
RplRcver
.Broadcast)]
23
protected
void
Rpc_AddBloodToBayonet
()
24
{
25
if
(
m_fBloodStainLevel
>=
MAX_BLOOD_LEVEL
)
26
return
;
27
28
ParametricMaterialInstanceComponent
materialComponent =
ParametricMaterialInstanceComponent
.Cast(
GetOwner
().
FindComponent
(
ParametricMaterialInstanceComponent
));
29
if
(!materialComponent)
30
return
;
31
32
m_fBloodStainLevel
+=
MAX_BLOOD_LEVEL
/
BLOOD_STEP_SIZE
;
33
34
materialComponent.SetUserParam2(
Math
.Clamp(
m_fBloodStainLevel
, 0.0,
MAX_BLOOD_LEVEL
));
35
}
36
}
AddBloodToBayonet
void AddBloodToBayonet()
Adds blood texture to bayonet.
Definition
SCR_BayonetComponent.c:15
BLOOD_STEP_SIZE
SCR_BayonetComponentClass BLOOD_STEP_SIZE
Blood visibility steps - cannot be 0.
m_fBloodStainLevel
float m_fBloodStainLevel
Definition
SCR_BayonetComponent.c:11
Rpc_AddBloodToBayonet
void Rpc_AddBloodToBayonet()
Definition
SCR_BayonetComponent.c:23
MAX_BLOOD_LEVEL
const float MAX_BLOOD_LEVEL
Definition
SCR_BayonetComponent.c:9
GenericComponent::FindComponent
proto external GenericComponent FindComponent(typename typeName)
GenericComponent::Rpc
void Rpc(func method, void p0=NULL, void p1=NULL, void p2=NULL, void p3=NULL, void p4=NULL, void p5=NULL, void p6=NULL, void p7=NULL)
Math
Definition
Math.c:13
ParametricMaterialInstanceComponent
Definition
ParametricMaterialInstanceComponent.c:13
SCR_BayonetComponentClass
Definition
SCR_BayonetComponent.c:2
ScriptComponentClass
Definition
ScriptComponentClass.c:8
ScriptComponent
Definition
ScriptComponent.c:24
ScriptComponent::GetOwner
proto external GenericEntity GetOwner()
Get owner entity.
RplRpc
void RplRpc(RplChannel channel, RplRcver rcver, RplCondition condition=RplCondition.None, string customConditionName="")
Definition
EnNetwork.c:95
RplRcver
RplRcver
Definition
RplRcver.c:59
RplChannel
RplChannel
Communication channel. Reliable is guaranteed to be delivered. Unreliable not.
Definition
RplChannel.c:14
scripts
Game
Weapon
Melee
SCR_BayonetComponent.c
Generated by
1.17.0