1 [
EntityEditorProps(
category:
"GameScripted/ScriptWizard", description:
"Handles client > server communication in Campaign tasks. Should be attached to PlayerController.", color:
"0 0 255 255")]
58 [
RplRpc(RplChannel.Reliable, RplRcver.Server)]
68 SCR_CampaignNetworkComponent networkComponent = SCR_CampaignNetworkComponent.Cast(
m_PlayerController.FindComponent(SCR_CampaignNetworkComponent));
69 if (!networkComponent)
72 networkComponent.SendPlayerMessage(
SCR_ERadioMsg.REQUEST_REINFORCEMENTS, base.GetCallsign(), checkHQReached:
true);
74 SCR_ChimeraCharacter character = SCR_ChimeraCharacter.Cast(
m_PlayerController.GetMainEntity());
79 if (!requesterFaction)
92 msg.SetTargetFaction(requesterFaction);
93 msg.SetTargetBase(base);
95 transmitter.BeginTransmission(msg);
99 [
RplRpc(RplChannel.Reliable, RplRcver.Server)]
105 SCR_CampaignNetworkComponent networkComponent = SCR_CampaignNetworkComponent.Cast(
m_PlayerController.FindComponent(SCR_CampaignNetworkComponent));
106 if (!networkComponent)
109 networkComponent.SendPlayerMessage(
SCR_ERadioMsg.REQUEST_TRANSPORT, checkHQReached:
true);
111 SCR_ChimeraCharacter character = SCR_ChimeraCharacter.Cast(
m_PlayerController.GetMainEntity());
116 if (!requesterFaction)
129 msg.SetRequesterMainBase(requesterFaction);
130 msg.SetRequesterID(requesterID);
131 msg.SetPosition(positionFrom);
132 msg.SetTargetPosition(positionTo);
133 transmitter.BeginTransmission(msg);
140 [
RplRpc(RplChannel.Reliable, RplRcver.Server)]
146 SCR_CampaignNetworkComponent networkComponent = SCR_CampaignNetworkComponent.Cast(
m_PlayerController.FindComponent(SCR_CampaignNetworkComponent));
147 if (!networkComponent)
150 networkComponent.SendPlayerMessage(
SCR_ERadioMsg.REQUEST_FUEL, checkHQReached:
true);
156 Vehicle vehicle =
SCR_RefuelTask.GetVehicleExecutorIsIn(taskExecutor);
163 SCR_ChimeraCharacter character = SCR_ChimeraCharacter.Cast(
m_PlayerController.GetMainEntity());
168 if (!requesterFaction)
181 msg.SetRequesterMainBase(requesterFaction);
182 msg.SetRequesterID(requesterID);
184 msg.SetRequesterVehicle(vehicle);
185 transmitter.BeginTransmission(msg);
192 [
RplRpc(RplChannel.Reliable, RplRcver.Server)]
198 SCR_CampaignNetworkComponent networkComponent = SCR_CampaignNetworkComponent.Cast(
m_PlayerController.FindComponent(SCR_CampaignNetworkComponent));
199 if (!networkComponent)
202 SCR_ChimeraCharacter character = SCR_ChimeraCharacter.Cast(
m_PlayerController.GetMainEntity());
208 networkComponent.SendPlayerMessage(
SCR_ERadioMsg.REQUEST_EVAC, closestBase.GetCallsign(), checkHQReached:
true);
211 if (!requesterFaction)
224 msg.SetRequesterMainBase(requesterFaction);
225 msg.SetRequesterID(requesterID);
227 transmitter.BeginTransmission(msg);
234 BaseRadioComponent
GetRadioComponent(PlayerController playerController, ChimeraCharacter character)
244 BaseRadioComponent radioComp = BaseRadioComponent.Cast(radio.FindComponent(BaseRadioComponent));