Arma Reforger Script API
Loading...
Searching...
No Matches
SCR_NotificationData Interface Reference

Saves data related to the notification system. More...

Public Member Functions

void SetMeta (int id, SCR_NotificationDisplayData displayData)
 Set notification's meta data: Faction color and initial position data.
 
int GetID ()
 Set notification ID.
 
ENotificationReceiver GetNotificationReceiverType ()
 Get who recieves the notification and how, like local only, GM only, Local GM only.
 
float GetNotificationTimeLeft ()
 Get how much time is left before notification data is deleted from SCR_NotificationsComponent array.
 
bool UpdateNotificationData (float timeSlice)
 Update the time left for the notification.
 
string GetText ()
 Get the display text for the notification.
 
void SetNotificationTextEntries (string entry1=string.Empty, string entry2=string.Empty, string entry3=string.Empty, string entry4=string.Empty, string entry5=string.Empty, string entry6=string.Empty)
 Set the notification entry texts.
 
void GetNotificationTextEntries (out string entry1=string.Empty, out string entry2=string.Empty, out string entry3=string.Empty, out string entry4=string.Empty, out string entry5=string.Empty, out string entry6=string.Empty)
 Set the notification entry texts.
 
void SetFactionRelatedColor (ENotificationColor factionRelatedColor)
 Set the faction color.
 
void SetFactionRelatedTextColor (ENotificationColor factionRelatedColor)
 Set the faction color for text.
 
void SetSplitFactionRelatedColor (ENotificationColor factionRelatedColorLeft, ENotificationColor factionRelatedColorRight)
 Set the faction color for splitNotifications.
 
ENotificationColor GetFactionRelatedColor ()
 Get the saved faction color.
 
ENotificationColor GetFactionRelatedTextColor ()
 Get the saved faction text color.
 
void GetSplitFactionRelatedColor (out ENotificationColor leftTextColor, out ENotificationColor rightTextColor)
 Get the saved faction text color.
 
SCR_NotificationDisplayData GetDisplayData ()
 Get the specific linked SCR_NotificationDisplayData type to get display data and position.
 
void GetPosition (out vector position)
 Get position of the notification.
 
void GetParams (out int param1, out int param2=0, out int param3=0, out int param4=0, out int param5=0, out int param6=0)
 Get parameters of the notification.
 
void Log ()
 Log information about the notification.
 
void SetPosition (vector position)
 Set position of the notification.
 
void SetParameters (ENotificationReceiver receiverType, int param1=0, int param2=0, int param3=0, int param4=0, int param5=0, int param6=0)
 Sets the Parameters.
 

Static Public Member Functions

static void Encode (SSnapSerializerBase snapshot, ScriptCtx hint, ScriptBitSerializer packet)
 
static bool Decode (ScriptBitSerializer packet, ScriptCtx hint, SSnapSerializerBase snapshot)
 
static bool SnapCompare (SSnapSerializerBase lhs, SSnapSerializerBase rhs, ScriptCtx hint)
 
static bool PropCompare (SCR_NotificationData prop, SSnapSerializerBase snapshot, ScriptCtx hint)
 
static bool Extract (SCR_NotificationData prop, ScriptCtx hint, SSnapSerializerBase snapshot)
 
static bool Inject (SSnapSerializerBase snapshot, ScriptCtx hint, SCR_NotificationData prop)
 

Protected Attributes

ENotification m_iID
 
float m_fNotificationTimeLeft = -1
 
int m_iPrevPositionUpdated = -1
 
string notificationEntry1
 
string notificationEntry2
 
string notificationEntry3
 
string notificationEntry4
 
string notificationEntry5
 
string notificationEntry6
 
bool m_bIsSplitNotification
 
ENotificationColor m_FactionRelatedColor = ENotificationColor.NEUTRAL
 
ENotificationColor m_FactionRelatedTextColor = ENotificationColor.NEUTRAL
 
ENotificationColor m_FactionRelatedTextLeftColor = ENotificationColor.NEUTRAL
 
ENotificationColor m_FactionRelatedTextRightColor = ENotificationColor.NEUTRAL
 
SCR_NotificationDisplayData m_DisplayData
 
int m_iParam1
 
int m_iParam2
 
int m_iParam3
 
int m_iParam4
 
int m_iParam5
 
int m_iParam6
 
vector m_vPosition = vector.Zero
 
ENotificationReceiver m_iNotificationReceiverType
 

Detailed Description

Saves data related to the notification system.

Data saved: ENotification id, float m_fTime, notification string parameters, A link to SCR_NotificationDisplayData, m_FactionRelatedColor if applicable and ints to store data See specific SCR_NotificationDisplayData classes to know which parameters should be send

Member Function Documentation

◆ Decode()

static bool SCR_NotificationData.Decode ( ScriptBitSerializer packet,
ScriptCtx hint,
SSnapSerializerBase snapshot )
static

◆ Encode()

static void SCR_NotificationData.Encode ( SSnapSerializerBase snapshot,
ScriptCtx hint,
ScriptBitSerializer packet )
static

◆ Extract()

static bool SCR_NotificationData.Extract ( SCR_NotificationData prop,
ScriptCtx hint,
SSnapSerializerBase snapshot )
static

◆ GetDisplayData()

SCR_NotificationDisplayData SCR_NotificationData.GetDisplayData ( )

Get the specific linked SCR_NotificationDisplayData type to get display data and position.

Returns
SCR_NotificationDisplayData DisplayData

◆ GetFactionRelatedColor()

ENotificationColor SCR_NotificationData.GetFactionRelatedColor ( )

Get the saved faction color.

Used to set the color of notification that can have faction variant colors depending on the target of the notification. So friendly player died will have a diffrent color then enemy player died

Returns
m_factionColor

◆ GetFactionRelatedTextColor()

ENotificationColor SCR_NotificationData.GetFactionRelatedTextColor ( )

Get the saved faction text color.

Used to set the color of notification that can have faction variant colors depending on the target of the notification. So friendly player died will have a diffrent color then enemy player died

Returns
faction related text color

◆ GetID()

int SCR_NotificationData.GetID ( )

Set notification ID.

Returns
Notification ID

◆ GetNotificationReceiverType()

ENotificationReceiver SCR_NotificationData.GetNotificationReceiverType ( )

Get who recieves the notification and how, like local only, GM only, Local GM only.

Returns
ENotificationReceiver which holds the notification receiver type

◆ GetNotificationTextEntries()

void SCR_NotificationData.GetNotificationTextEntries ( out string entry1 = string::Empty,
out string entry2 = string::Empty,
out string entry3 = string::Empty,
out string entry4 = string::Empty,
out string entry5 = string::Empty,
out string entry6 = string::Empty )

Set the notification entry texts.

Parameters
outentry1
outentry2
outentry3
outentry4
outentry5
outentry6

◆ GetNotificationTimeLeft()

float SCR_NotificationData.GetNotificationTimeLeft ( )

Get how much time is left before notification data is deleted from SCR_NotificationsComponent array.

Returns
Time in miliseconds

◆ GetParams()

void SCR_NotificationData.GetParams ( out int param1,
out int param2 = 0,
out int param3 = 0,
out int param4 = 0,
out int param5 = 0,
out int param6 = 0 )

Get parameters of the notification.

Parameters
[out]param1
[out]param2
[out]param3
[out]param4
[out]param5
[out]param5
[out]param6

◆ GetPosition()

void SCR_NotificationData.GetPosition ( out vector position)

Get position of the notification.

Parameters
[out]position

◆ GetSplitFactionRelatedColor()

void SCR_NotificationData.GetSplitFactionRelatedColor ( out ENotificationColor leftTextColor,
out ENotificationColor rightTextColor )

Get the saved faction text color.

Used to set the color of notification that can have faction variant colors depending on the target of the notification. So friendly player died will have a diffrent color then enemy player died

Returns
faction related text color

◆ GetText()

string SCR_NotificationData.GetText ( )

Get the display text for the notification.

Returns
string display text

◆ Inject()

static bool SCR_NotificationData.Inject ( SSnapSerializerBase snapshot,
ScriptCtx hint,
SCR_NotificationData prop )
static

◆ Log()

void SCR_NotificationData.Log ( )

Log information about the notification.

◆ PropCompare()

static bool SCR_NotificationData.PropCompare ( SCR_NotificationData prop,
SSnapSerializerBase snapshot,
ScriptCtx hint )
static

◆ SetFactionRelatedColor()

void SCR_NotificationData.SetFactionRelatedColor ( ENotificationColor factionRelatedColor)

Set the faction color.

Faction color is used to set the color of notification that can have faction variant colors depending on the target of the notification. So friendly player died will have a diffrent color then enemy player died

Parameters
factionPositiveNegativeColorthe new faction color to set

◆ SetFactionRelatedTextColor()

void SCR_NotificationData.SetFactionRelatedTextColor ( ENotificationColor factionRelatedColor)

Set the faction color for text.

Faction color is used to set the color of notification that can have faction variant colors depending on the target of the notification. So friendly player died will have a diffrent color then enemy player died

Parameters
factionPositiveNegativeColorthe new faction color to set for text

◆ SetMeta()

void SCR_NotificationData.SetMeta ( int id,
SCR_NotificationDisplayData displayData )

Set notification's meta data: Faction color and initial position data.

Parameters
idNotification ID
notificationTextsaved text of notification
notificationTargettarget of notification for editor
locationtarget of notification for editor

◆ SetNotificationTextEntries()

void SCR_NotificationData.SetNotificationTextEntries ( string entry1 = string::Empty,
string entry2 = string::Empty,
string entry3 = string::Empty,
string entry4 = string::Empty,
string entry5 = string::Empty,
string entry6 = string::Empty )

Set the notification entry texts.

Parameters
entry1
entry2
entry3
entry4
entry5
entry6

◆ SetParameters()

void SCR_NotificationData.SetParameters ( ENotificationReceiver receiverType,
int param1 = 0,
int param2 = 0,
int param3 = 0,
int param4 = 0,
int param5 = 0,
int param6 = 0 )

Sets the Parameters.

Parameters
receiverType,ageneral type of who will will receive the notification such as: GM only, local only, etc
param1
param2
param3
param4
param5
param5
param6

◆ SetPosition()

void SCR_NotificationData.SetPosition ( vector position)

Set position of the notification.

Parameters
position

◆ SetSplitFactionRelatedColor()

void SCR_NotificationData.SetSplitFactionRelatedColor ( ENotificationColor factionRelatedColorLeft,
ENotificationColor factionRelatedColorRight )

Set the faction color for splitNotifications.

Faction color is used to set the color of notification that can have faction variant colors depending on the targets (param1 and param2) of the notification. So friendly player died will have a diffrent color then enemy player died

Parameters
factionRelatedColorLeftthe new faction color to set for left text
factionRelatedColorRightthe new faction color to set for right text

◆ SnapCompare()

static bool SCR_NotificationData.SnapCompare ( SSnapSerializerBase lhs,
SSnapSerializerBase rhs,
ScriptCtx hint )
static

◆ UpdateNotificationData()

bool SCR_NotificationData.UpdateNotificationData ( float timeSlice)

Update the time left for the notification.

It will be removed from the data in the Notification component once it reaches 0

Parameters
timeSliceamount removed from time left
Returns
returns true if the time left reaches 0 or less

Member Data Documentation

◆ m_bIsSplitNotification

bool SCR_NotificationData.m_bIsSplitNotification
protected

◆ m_DisplayData

SCR_NotificationDisplayData SCR_NotificationData.m_DisplayData
protected

◆ m_FactionRelatedColor

ENotificationColor SCR_NotificationData.m_FactionRelatedColor = ENotificationColor.NEUTRAL
protected

◆ m_FactionRelatedTextColor

ENotificationColor SCR_NotificationData.m_FactionRelatedTextColor = ENotificationColor.NEUTRAL
protected

◆ m_FactionRelatedTextLeftColor

ENotificationColor SCR_NotificationData.m_FactionRelatedTextLeftColor = ENotificationColor.NEUTRAL
protected

◆ m_FactionRelatedTextRightColor

ENotificationColor SCR_NotificationData.m_FactionRelatedTextRightColor = ENotificationColor.NEUTRAL
protected

◆ m_fNotificationTimeLeft

float SCR_NotificationData.m_fNotificationTimeLeft = -1
protected

◆ m_iID

ENotification SCR_NotificationData.m_iID
protected

◆ m_iNotificationReceiverType

ENotificationReceiver SCR_NotificationData.m_iNotificationReceiverType
protected

◆ m_iParam1

int SCR_NotificationData.m_iParam1
protected

◆ m_iParam2

int SCR_NotificationData.m_iParam2
protected

◆ m_iParam3

int SCR_NotificationData.m_iParam3
protected

◆ m_iParam4

int SCR_NotificationData.m_iParam4
protected

◆ m_iParam5

int SCR_NotificationData.m_iParam5
protected

◆ m_iParam6

int SCR_NotificationData.m_iParam6
protected

◆ m_iPrevPositionUpdated

int SCR_NotificationData.m_iPrevPositionUpdated = -1
protected

◆ m_vPosition

vector SCR_NotificationData.m_vPosition = vector.Zero
protected

◆ notificationEntry1

string SCR_NotificationData.notificationEntry1
protected

◆ notificationEntry2

string SCR_NotificationData.notificationEntry2
protected

◆ notificationEntry3

string SCR_NotificationData.notificationEntry3
protected

◆ notificationEntry4

string SCR_NotificationData.notificationEntry4
protected

◆ notificationEntry5

string SCR_NotificationData.notificationEntry5
protected

◆ notificationEntry6

string SCR_NotificationData.notificationEntry6
protected

The documentation for this interface was generated from the following file: