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_TransportTask.c
Go to the documentation of this file.
1
//[EntityEditorProps(category: "GameScripted/Tasks", description: "Transport task.")]
2
//class SCR_TransportTaskClass : SCR_RequestedTaskClass
3
//{
4
//};
5
//
7
//class SCR_TransportTask : SCR_RequestedTask
8
//{
9
// [Attribute("")]
10
// protected LocalizedString m_sAssigneeMetText;
11
//
12
// [Attribute("")]
13
// protected LocalizedString m_sRequesterMetText;
14
//
15
// protected vector m_vTargetPosition = vector.Zero;
16
// protected bool m_bVolunteerMet = false;
17
//
18
// //------------------------------------------------------------------------------------------------
19
// bool GetVolunteerMet()
20
// {
21
// return m_bVolunteerMet;
22
// }
23
//
24
// //------------------------------------------------------------------------------------------------
25
// void SetVolunteerMet(bool volunteerMet)
26
// {
27
// m_bVolunteerMet = volunteerMet;
28
//
29
// if (volunteerMet)
30
// {
31
// if (IsAssignedToLocalPlayer())
32
// SCR_PopUpNotification.GetInstance().PopupMsg(m_sRequesterMetText, prio: SCR_ECampaignPopupPriority.TASK_DONE);
33
// if (IsLocallyRequestedTask())
34
// SCR_PopUpNotification.GetInstance().PopupMsg(m_sAssigneeMetText, prio: SCR_ECampaignPopupPriority.TASK_DONE);
35
// }
36
// }
37
//
38
// //------------------------------------------------------------------------------------------------
39
// void SetTargetPosition(vector targetPosition)
40
// {
41
// m_vTargetPosition = targetPosition;
42
// }
43
//
44
// //------------------------------------------------------------------------------------------------
45
// vector GetTargetPosition()
46
// {
47
// return m_vTargetPosition;
48
// }
49
//
50
// //------------------------------------------------------------------------------------------------
51
// override void OnAssigneeKilled()
52
// {
53
// if (!GetTaskManager() || GetTaskManager().IsProxy())
54
// return;
55
//
56
// SCR_BaseTaskSupportEntity supportEntity = GetTaskManager().FindSupportEntity(SCR_BaseTaskSupportEntity);
57
// if (!supportEntity)
58
// return;
59
//
60
// if (GetVolunteerMet())
61
// supportEntity.FailTask(this);
62
// }
63
//
64
// //------------------------------------------------------------------------------------------------
65
// void PeriodicalCheck()
66
// {
67
// if (!GetTaskManager())
68
// return;
69
//
70
// SCR_BaseTaskExecutor assignee = GetAssignee();
71
// if (!assignee)
72
// return;
73
//
74
// IEntity assigneeEntity = assignee.GetControlledEntity();
75
// IEntity requesterEntity = m_Requester.GetControlledEntity();
76
//
77
// SCR_TransportTaskSupportEntity supportEntity = SCR_TransportTaskSupportEntity.Cast(GetTaskManager().FindSupportEntity(SCR_TransportTaskSupportEntity));
78
// if (!supportEntity)
79
// return;
80
//
81
// if (!GetVolunteerMet())
82
// {
83
// if (vector.DistanceSq(assigneeEntity.GetOrigin(), requesterEntity.GetOrigin()) > supportEntity.GetMaxDistanceAssigneeSq())
84
// return;
85
//
86
// supportEntity.TransportTaskNextPhase(this);
87
// return;
88
// }
89
// else if (vector.DistanceSq(requesterEntity.GetOrigin(), GetOrigin()) > supportEntity.GetMaxDistanceDestinationSq())
90
// return;
91
//
92
// supportEntity.FinishTask(this);
93
// }
94
//
95
// //------------------------------------------------------------------------------------------------
96
// override void Deserialize(ScriptBitReader reader)
97
// {
98
// super.Deserialize(reader);
99
//
100
// reader.ReadVector(m_vTargetPosition);
101
//
102
// bool volunteerMet;
103
// reader.ReadBool(volunteerMet);
104
// SetVolunteerMet(volunteerMet);
105
// }
106
//
107
// //------------------------------------------------------------------------------------------------
108
// override void Serialize(ScriptBitWriter writer)
109
// {
110
// super.Serialize(writer);
111
//
112
// vector targetPosition = GetTargetPosition();
113
// writer.WriteVector(targetPosition);
114
// writer.WriteBool(m_bVolunteerMet);
115
// }
116
//
117
// //------------------------------------------------------------------------------------------------
118
// override void EOnInit(IEntity owner)
119
// {
120
// super.EOnInit(owner);
121
//
122
// SCR_BaseTaskManager taskManager = GetTaskManager();
123
// if (taskManager && taskManager.IsProxy())
124
// return;
125
//
126
// SCR_BaseTaskManager.s_OnPeriodicalCheck2Second.Insert(PeriodicalCheck);
127
// }
128
//
129
// //------------------------------------------------------------------------------------------------
130
// void SCR_TransportTask(IEntitySource src, IEntity parent)
131
// {
132
// SetEventMask(EntityEvent.INIT);
133
// }
134
//
135
// //------------------------------------------------------------------------------------------------
136
// void ~SCR_TransportTask()
137
// {
138
// }
139
//
140
//};
scripts
Game
Tasks
SCR_TransportTask.c
Generated by
1.17.0