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_TutorialLogic_Medical.c
Go to the documentation of this file.
1
[
BaseContainerProps
()]
2
class
SCR_TutorialLogic_Medical
:
SCR_BaseTutorialCourseLogic
3
{
4
protected
SCR_CharacterDamageManagerComponent
m_VictimDamageManager
;
5
//------------------------------------------------------------------------------------------------
6
override
void
OnCourseStart
()
7
{
8
IEntity
victim =
GetGame
().
GetWorld
().FindEntityByName(
"Victim"
);
9
if
(!victim)
10
return
;
11
12
m_VictimDamageManager
=
SCR_CharacterDamageManagerComponent
.Cast(victim.
FindComponent
(
SCR_CharacterDamageManagerComponent
));
13
if
(!
m_VictimDamageManager
)
14
return
;
15
16
//prepare injuries on victim
17
m_VictimDamageManager
.AddParticularBleeding(
"LThigh"
);
18
m_VictimDamageManager
.AddParticularBleeding(
"Chest"
);
19
m_VictimDamageManager
.GetHitZoneByName(
"LThigh"
).SetHealth(0);
20
m_VictimDamageManager
.GetHitZoneByName(
"Chest"
).SetHealth(0);
21
m_VictimDamageManager
.ForceUnconsciousness();
22
23
GetGame
().GetCallqueue().Remove(
RefreshVictimBloodLevel
);
24
GetGame
().GetCallqueue().Remove(
RefreshVictimResilience
);
25
GetGame
().GetCallqueue().CallLater(
RefreshVictimBloodLevel
, 1000,
true
);
26
GetGame
().GetCallqueue().CallLater(
RefreshVictimResilience
, 1000,
true
);
27
28
IEntity
vehicle =
GetGame
().
GetWorld
().FindEntityByName(
"AccidentJeep"
);
29
if
(!vehicle)
30
return
;
31
32
SCR_CompartmentAccessComponent
compartmentAccess =
SCR_CompartmentAccessComponent
.Cast(victim.
FindComponent
(
SCR_CompartmentAccessComponent
));
33
if
(!compartmentAccess)
34
return
;
35
36
//Lock jeep to prevent players from driving away with it.
37
SCR_BaseLockComponent spawnProtectionComponent = SCR_BaseLockComponent.Cast(vehicle.
FindComponent
(SCR_BaseLockComponent));
38
if
(spawnProtectionComponent)
39
spawnProtectionComponent.SetLocked(
true
);
40
41
compartmentAccess.
MoveInVehicle
(vehicle,
ECompartmentType
.PILOT);
42
}
43
44
//------------------------------------------------------------------------------------------------
45
override
void
OnCourseEnd
()
46
{
47
GetGame
().GetCallqueue().Remove(
RefreshVictimBloodLevel
);
48
GetGame
().GetCallqueue().Remove(
RefreshVictimResilience
);
49
50
SCR_TutorialGamemodeComponent tutorial = SCR_TutorialGamemodeComponent.GetInstance();
51
if
(!tutorial)
52
return
;
53
54
tutorial.InsertIntoGarbage(
"AccidentJeep"
);
55
tutorial.InsertIntoGarbage(
"Victim"
);
56
}
57
58
//------------------------------------------------------------------------------------------------
60
void
RefreshVictimResilience
()
61
{
62
if
(!
m_VictimDamageManager
)
63
{
64
GetGame
().GetCallqueue().Remove(
RefreshVictimResilience
);
65
return
;
66
}
67
68
m_VictimDamageManager
.GetResilienceHitZone().SetHealth(0);
69
}
70
71
//------------------------------------------------------------------------------------------------
73
void
RefreshVictimBloodLevel
()
74
{
75
if
(!
m_VictimDamageManager
)
76
{
77
GetGame
().GetCallqueue().Remove(
RefreshVictimResilience
);
78
return
;
79
}
80
81
m_VictimDamageManager
.GetBloodHitZone().SetHealth(2000);
82
}
83
}
ECompartmentType
ECompartmentType
Definition
ECompartmentType.c:8
GetGame
ArmaReforgerScripted GetGame()
Definition
game.c:1398
BaseContainerProps
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Definition
SCR_AIAnimationWaypoint.c:14
IEntity
Definition
IEntity.c:13
IEntity::FindComponent
proto external Managed FindComponent(typename typeName)
IEntity::GetWorld
proto external BaseWorld GetWorld()
SCR_BaseTutorialCourseLogic
Definition
SCR_BaseTutorialCourseLogic.c:3
SCR_CharacterDamageManagerComponent
Definition
SCR_CharacterDamageManagerComponent.c:19
SCR_CompartmentAccessComponent
Definition
SCR_CompartmentAccessComponent.c:16
SCR_CompartmentAccessComponent::MoveInVehicle
bool MoveInVehicle(IEntity vehicle, ECompartmentType compartmentType, bool performWhenPaused=false, BaseCompartmentSlot customSlot=null)
Definition
SCR_CompartmentAccessComponent.c:257
SCR_TutorialLogic_Medical
Definition
SCR_TutorialLogic_Medical.c:3
SCR_TutorialLogic_Medical::OnCourseStart
override void OnCourseStart()
Definition
SCR_TutorialLogic_Medical.c:6
SCR_TutorialLogic_Medical::m_VictimDamageManager
SCR_CharacterDamageManagerComponent m_VictimDamageManager
Definition
SCR_TutorialLogic_Medical.c:4
SCR_TutorialLogic_Medical::RefreshVictimBloodLevel
void RefreshVictimBloodLevel()
Definition
SCR_TutorialLogic_Medical.c:73
SCR_TutorialLogic_Medical::RefreshVictimResilience
void RefreshVictimResilience()
Definition
SCR_TutorialLogic_Medical.c:60
SCR_TutorialLogic_Medical::OnCourseEnd
override void OnCourseEnd()
Definition
SCR_TutorialLogic_Medical.c:45
scripts
Game
GameMode
Tutorial
Stages
Medical
SCR_TutorialLogic_Medical.c
Generated by
1.17.0