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_PlayerTeleportedFeedbackComponent.c
Go to the documentation of this file.
1
[
ComponentEditorProps
(
category
:
"GameScripted/Misc"
, description:
""
)]
2
class
SCR_PlayerTeleportedFeedbackComponentClass
:
ScriptComponentClass
3
{
4
}
5
6
class
SCR_PlayerTeleportedFeedbackComponent :
ScriptComponent
7
{
8
protected
ref
ScriptInvoker
m_OnPlayerTeleported
=
new
ScriptInvoker
();
//param int GM that teleported the player
9
protected
PlayerManager
m_PlayerManager
;
10
11
//------------------------------------------------------------------------------------------------
13
ScriptInvoker
GetOnPlayerTeleported
()
14
{
15
return
m_OnPlayerTeleported
;
16
}
17
18
//------------------------------------------------------------------------------------------------
20
void
PlayerTeleported
(
IEntity
character,
bool
isLongFade,
SCR_EPlayerTeleportedReason
teleportReason)
21
{
22
//~ Do not show teleport feedback if no character
23
if
(!character)
24
return
;
25
26
//~ Do not show teleport feedback if dead
27
SCR_DamageManagerComponent damageManager = SCR_DamageManagerComponent.GetDamageManager(character);
28
if
(damageManager && damageManager.GetState() ==
EDamageState
.DESTROYED)
29
return
;
30
31
bool
editorIsOpen =
SCR_EditorManagerEntity
.IsOpenedInstance();
32
33
m_OnPlayerTeleported
.Invoke(editorIsOpen, isLongFade, teleportReason);
34
35
//~ Player teleported by GM
36
if
(teleportReason ==
SCR_EPlayerTeleportedReason
.EDITOR)
37
{
38
//~ Only show notification if editor is closed
39
if
(!editorIsOpen)
40
SCR_NotificationsComponent.SendLocal(
ENotification
.EDITOR_GM_TELEPORTED_PLAYER);
41
}
42
//~ Player teleported as blocking spawner
43
else
if
(teleportReason ==
SCR_EPlayerTeleportedReason
.BLOCKING_SPAWNER)
44
{
45
SCR_NotificationsComponent.SendLocal(
ENotification
.TELEPORTED_PLAYER_BLOCKING_SPAWNER);
46
}
47
}
48
}
49
50
enum
SCR_EPlayerTeleportedReason
51
{
52
DEFAULT
,
53
EDITOR
,
54
BLOCKING_SPAWNER
,
55
FAST_TRAVEL
56
}
ENotification
ENotification
Definition
ENotification.c:5
ComponentEditorProps
enum EAIGroupCombatMode ComponentEditorProps(category:"GameScripted/AI", description:"Component for utility AI system for groups")
Definition
SCR_AIGroupUtilityComponent.c:12
EDITOR
@ EDITOR
Definition
SCR_AISetting.c:5
PlayerTeleported
void PlayerTeleported(SCR_EditableCharacterComponent character, bool isLongFade, SCR_EPlayerTeleportedReason teleportReason)
Definition
SCR_CampaignBuildingProviderComponent.c:888
SCR_EditorManagerEntity
void SCR_EditorManagerEntity(IEntitySource src, IEntity parent)
Definition
SCR_EditorManagerEntity.c:2211
GetOnPlayerTeleported
ScriptInvoker GetOnPlayerTeleported()
Get on player Teleported script invoker.
Definition
SCR_PlayerTeleportedFeedbackComponent.c:13
m_OnPlayerTeleported
SCR_PlayerTeleportedFeedbackComponentClass m_OnPlayerTeleported
m_PlayerManager
PlayerManager m_PlayerManager
Definition
SCR_PlayerTeleportedFeedbackComponent.c:9
SCR_EPlayerTeleportedReason
SCR_EPlayerTeleportedReason
Definition
SCR_PlayerTeleportedFeedbackComponent.c:51
FAST_TRAVEL
@ FAST_TRAVEL
Definition
SCR_PlayerTeleportedFeedbackComponent.c:55
BLOCKING_SPAWNER
@ BLOCKING_SPAWNER
Definition
SCR_PlayerTeleportedFeedbackComponent.c:54
category
params category
Definition
SCR_VehicleDamageManagerComponent.c:302
IEntity
Definition
IEntity.c:13
PlayerManager
Definition
PlayerManager.c:13
SCR_PlayerTeleportedFeedbackComponentClass
Definition
SCR_PlayerTeleportedFeedbackComponent.c:3
ScriptComponentClass
Definition
ScriptComponentClass.c:8
ScriptComponent
Definition
ScriptComponent.c:24
DEFAULT
@ DEFAULT
Use currently set main RT format (based on game options).
Definition
DebugTextFlags.c:14
EDamageState
EDamageState
Definition
EDamageState.c:13
ScriptInvoker
ScriptInvokerBase< func > ScriptInvoker
Definition
tools.c:134
scripts
Game
Components
SCR_PlayerTeleportedFeedbackComponent.c
Generated by
1.17.0