Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_Tutorial_Seizing_Construct_Antenna.c
Go to the documentation of this file.
1[EntityEditorProps(insertable: false)]
5
6//------------------------------------------------------------------------------------------------
8{
9 SCR_CampaignBuildingCompositionComponent m_CampaignBuildingComponent;
10 //------------------------------------------------------------------------------------------------
11 override protected void Setup()
12 {
13 IEntity bunker = GetGame().GetWorld().FindEntityByName("BUILDING_ANTENNA");
14 if (!bunker)
15 return;
16
17 RegisterWaypoint(bunker, "", "BUILD");
18
19 m_CampaignBuildingComponent = SCR_CampaignBuildingCompositionComponent.Cast(bunker.FindComponent(SCR_CampaignBuildingCompositionComponent));
20 }
21
22 //------------------------------------------------------------------------------------------------
23 override protected void OnStageFinished()
24 {
25 IEntity fakeBase = GetGame().GetWorld().FindEntityByName("FakeBaseLighthouseNorth");
26 if (fakeBase)
27 {
28 SCR_TutorialFakeBaseComponent fakeBaseComponent = SCR_TutorialFakeBaseComponent.Cast(fakeBase.FindComponent(SCR_TutorialFakeBaseComponent));
29 if (fakeBaseComponent)
30 {
31 //TODO: SUBOPTIMAL
32 fakeBaseComponent.AddLinkName("FakeBaseSignalHill");
33 fakeBaseComponent.CreateLinks();
34 fakeBaseComponent.m_bAntennaWidgetVisible = false;
35 SCR_Enum.SetFlag(fakeBaseComponent.m_eServices, SCR_EFakeBaseServices.RADIO_ANTENNA);
36 }
37 }
38
39 super.OnStageFinished();
40 }
41
42 //------------------------------------------------------------------------------------------------
43 override protected bool GetIsFinished()
44 {
45 if (!m_CampaignBuildingComponent)
46 return false;
47
48 return m_CampaignBuildingComponent.IsCompositionSpawned();
49 }
50};
ArmaReforgerScripted GetGame()
Definition game.c:1398
enum SCR_ECompassType EntityEditorProps(category:"GameScripted/Gadgets", description:"Compass", color:"0 0 255 255")
Prefab data class for compass component.
SCR_EFakeBaseServices
void IEntity(IEntitySource src, IEntity parent)
protected script Constructor
proto external Managed FindComponent(typename typeName)
SCR_Waypoint RegisterWaypoint(string entityName, string title=string.Empty, string icon="MISC")