9 protected float m_fSavedTime;
10 protected AudioHandle m_PlayedRadio = AudioHandle.Invalid;
13 override protected void Setup()
15 m_fConditionCheckPeriod = 0.1;
17 SCR_HintManagerComponent.HideHint();
18 SCR_HintManagerComponent.ClearLatestHint();
19 PlaySoundSystem(
"Conflict_Transmission",
true);
22 InputManager inputMan =
GetGame().GetInputManager();
23 inputMan.AddActionListener(
"VONChannel", EActionTrigger.DOWN, OnVOIPPress);
24 inputMan.AddActionListener(
"VONChannel", EActionTrigger.UP, OnVOIPRelease);
25 inputMan.AddActionListener(
"VONGamepad", EActionTrigger.DOWN, OnVOIPPress);
26 inputMan.AddActionListener(
"VONGamepad", EActionTrigger.UP, OnVOIPRelease);
30 override protected bool GetIsFinished()
32 BaseRadioComponent radio = m_TutorialComponent.GetPlayerRadio();
41 if (tsv.GetFrequency() != DESIRED_FREQUENCY)
44 bool done = tsv.GetFrequency() == DESIRED_FREQUENCY && m_fSavedTime != 0 && m_fSavedTime + 6000 <=
GetGame().GetWorld().GetWorldTime();
48 InputManager inputMan =
GetGame().GetInputManager();
49 inputMan.RemoveActionListener(
"VONChannel", EActionTrigger.DOWN, OnVOIPPress);
50 inputMan.RemoveActionListener(
"VONChannel", EActionTrigger.UP, OnVOIPRelease);
51 inputMan.RemoveActionListener(
"VONGamepad", EActionTrigger.DOWN, OnVOIPPress);
52 inputMan.RemoveActionListener(
"VONGamepad", EActionTrigger.UP, OnVOIPRelease);
64 BaseRadioComponent radio = m_TutorialComponent.GetPlayerRadio();
73 IEntity unit = radio.GetOwner().GetParent();
75 if (unit ==
m_Player && tsv.GetFrequency() == DESIRED_FREQUENCY && radio.IsPowered())
77 m_fSavedTime =
GetGame().GetWorld().GetWorldTime();
90 void PlayRadioMsg(
bool stop =
false)
92 AudioSystem.TerminateSound(m_PlayedRadio);
97 SCR_CommunicationSoundComponent soundComp = SCR_CommunicationSoundComponent.Cast(
m_Player.FindComponent(SCR_CommunicationSoundComponent));
102 SignalsManagerComponent signalComp = SignalsManagerComponent.Cast(
m_Player.FindComponent(SignalsManagerComponent));
111 int signalBase = signalComp.AddOrFindSignal(
"Base");
113 signalComp.SetSignalValue(signalBase, baseCallsign);
115 m_PlayedRadio = soundComp.SoundEvent(
SCR_SoundEvent.SOUND_SL_SRT +
"_US");