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_ScenarioFrameworkMedicalActionSetTourniquettedGroup.c
Go to the documentation of this file.
1
[
BaseContainerProps
(),
SCR_ContainerMedicalActionTitle
()]
2
class
SCR_ScenarioFrameworkMedicalActionSetTourniquettedGroup
:
SCR_ScenarioFrameworkMedicalAction
3
{
4
[
Attribute
(
"10"
,
UIWidgets
.ComboBox,
"Select Character hit zone group to add/remove tourniquets"
,
""
, ParamEnumArray.FromEnum(
ECharacterHitZoneGroup
))]
5
ECharacterHitZoneGroup
m_eCharacterHitZoneGroup;
6
7
[
Attribute
(defvalue:
"{D70216B1B2889129}Prefabs/Items/Medicine/Tourniquet_01/Tourniquet_US_01.et"
,
desc
:
"Resource name of the Tourniquet you want to use"
)]
8
ResourceName
m_sTourniquetPrefab;
9
10
[
Attribute
(defvalue:
"1"
, uiwidget:
UIWidgets
.CheckBox,
desc
:
"Whether target hit zone group is tourniquetted or not"
)]
11
bool
m_bTourniquetted;
12
13
//------------------------------------------------------------------------------------------------
14
override
void
OnActivate
()
15
{
16
super.OnActivate();
17
18
if
(!m_bTourniquetted)
19
{
20
SCR_TourniquetStorageComponent
tourniquetStorage =
SCR_TourniquetStorageComponent
.Cast(m_DamageManager.GetOwner().FindComponent(
SCR_TourniquetStorageComponent
));
21
if
(!tourniquetStorage)
22
{
23
Print
(
string
.Format(
"ScenarioFramework Action: Tourniquet Storage Component not found for Action %1."
,
this
),
LogLevel
.ERROR);
24
return
;
25
}
26
27
tourniquetStorage.
RemoveTourniquetFromSlot
(m_eCharacterHitZoneGroup, m_DamageManager.GetOwner());
28
29
return
;
30
}
31
32
Resource
resource =
Resource
.Load(m_sTourniquetPrefab);
33
if
(!resource && !resource.IsValid())
34
return
;
35
36
EntitySpawnParams
spawnParams =
new
EntitySpawnParams
();
37
m_DamageManager.GetOwner().GetWorldTransform(spawnParams.Transform);
38
spawnParams.TransformMode = ETransformMode.WORLD;
39
40
IEntity
tourniquet =
GetGame
().SpawnEntityPrefab(resource,
GetGame
().GetWorld(), spawnParams);
41
if
(!tourniquet)
42
return
;
43
44
SCR_ConsumableItemComponent consumableItemComp = SCR_ConsumableItemComponent.Cast(tourniquet.
FindComponent
(SCR_ConsumableItemComponent));
45
if
(!consumableItemComp)
46
return
;
47
48
SCR_ConsumableEffectBase consumableEffect = consumableItemComp.GetConsumableEffect();
49
if
(!consumableEffect)
50
return
;
51
52
ItemUseParameters
params
=
ItemUseParameters
();
53
params
.SetEntity(tourniquet);
54
params
.SetAllowMovementDuringAction(
false
);
55
params
.SetKeepInHandAfterSuccess(
false
);
56
params
.SetIntParam(m_DamageManager.FindAssociatedBandagingBodyPart(m_eCharacterHitZoneGroup));
57
58
consumableEffect.ApplyEffect(m_DamageManager.GetOwner(), m_DamageManager.GetOwner(), tourniquet,
params
);
59
}
60
}
GetGame
ArmaReforgerScripted GetGame()
Definition
game.c:1398
BaseContainerProps
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Definition
SCR_AIAnimationWaypoint.c:14
OnActivate
override void OnActivate()
Definition
SCR_CharacterCommandLoiter.c:31
ECharacterHitZoneGroup
ECharacterHitZoneGroup
Definition
SCR_CharacterDamageManagerComponent.c:2
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition
SCR_RespawnBriefingComponent.c:17
params
category params
Definition
SCR_SpherePointGeneratorPreviewComponent.c:21
IEntity
Definition
IEntity.c:13
IEntity::FindComponent
proto external Managed FindComponent(typename typeName)
ItemUseParameters
Definition
ItemUseParameters.c:16
Resource
Object holding reference to resource. In destructor release the resource.
Definition
Resource.c:25
ResourceName
Definition
ResourceName.c:13
SCR_ContainerMedicalActionTitle
Definition
SCR_ContainerMedicalActionTitle.c:2
SCR_ScenarioFrameworkMedicalAction
Definition
SCR_ScenarioFrameworkMedicalAction.c:3
SCR_ScenarioFrameworkMedicalActionSetTourniquettedGroup
Definition
SCR_ScenarioFrameworkMedicalActionSetTourniquettedGroup.c:3
SCR_TourniquetStorageComponent
Definition
SCR_TourniquetStorageComponent.c:52
SCR_TourniquetStorageComponent::RemoveTourniquetFromSlot
bool RemoveTourniquetFromSlot(ECharacterHitZoneGroup eHitZoneGroup, IEntity retrievingCharacter=null)
Definition
SCR_TourniquetStorageComponent.c:131
UIWidgets
Definition
attributes.c:40
EntitySpawnParams
void EntitySpawnParams()
Definition
gameLib.c:130
Print
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
LogLevel
LogLevel
Enum with severity of the logging message.
Definition
LogLevel.c:14
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
scripts
Game
ScenarioFramework
Actions
MedicalActions
SCR_ScenarioFrameworkMedicalActionSetTourniquettedGroup.c
Generated by
1.17.0