Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_NotificationPlayerAndLocation.c
Go to the documentation of this file.
1
9{
10 [Attribute(defvalue: "1", params: "1 1000", desc: "Notifications can only send int's thus if you want to send a float you will need to send all values the amount of values you want after the dot. eg: 23.05 = * 100 to get 2 values after the dot. You will need to make sure this attribute is the same amount as you multiplied it with")]
11 protected int m_iNumberDivider;
12
14 {
15 int playerID, param2;
16 data.GetParams(playerID, param2);
17
18 string playerName;
19 data.GetNotificationTextEntries(playerName);
20 if (!GetPlayerName(playerID, playerName))
21 return string.Empty;
22
23 float distance = param2;
25
27 data.GetPosition(position);
28
29 string location;
30
31 //~ Get nearest location
32 SCR_EditableEntityComponent nearestLocation;
34 if (core)
35 nearestLocation = core.FindNearestEntity(position, EEditableEntityType.COMMENT, EEditableEntityFlag.LOCAL);
36
37 //~ Set nearest location name or position as location name if no nearest found
38 if (nearestLocation)
39 location = nearestLocation.GetDisplayName();
40 else
42
43 data.SetNotificationTextEntries(playerName, distance.ToString(), location);
44 return super.GetText(data);
45 }
46};
vector location
ENotification
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
class SCR_CampaignHintStorage SCR_BaseContainerCustomTitleEnum(EHint, "m_eHintId")
float distance
vector position
Get all prefabs that have the spawner data
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
SCR_EditableEntityComponent FindNearestEntity(vector pos, EEditableEntityType type, EEditableEntityFlag flags=0, bool onlyDirect=true)
static string GetGridLabel(vector pos, int resMin=2, int resMax=4, string delimiter=" ")
bool GetPlayerName(int playerID, out string playerName)
override string GetText(SCR_NotificationData data)
EEditableEntityType
Defines type of SCR_EditableEntityComponent. Assigned automatically based on IEntity inheritance.
EEditableEntityFlag
Unique flags of the entity.
SCR_FieldOfViewSettings Attribute
T2 param2
Definition tuple.c:92