Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_Tutorial_SquadLeadership_SelectGroup.c
Go to the documentation of this file.
1[EntityEditorProps(insertable: false)]
5
6class SCR_Tutorial_SquadLeadership_SelectGroup : SCR_BaseTutorialStage
7{
8 protected string m_sSpawnedEntityName = "REQUESTING_GROUP";
10 protected bool m_bPreviewSelected;
11
12 //------------------------------------------------------------------------------------------------
13 override protected void Setup()
14 {
15 SCR_HintManagerComponent.HideHint();
16 SCR_HintManagerComponent.ClearLatestHint();
17
18 SCR_PreviewEntityEditorComponent previewEntityComponent = m_TutorialComponent.GetPreviewEntityComponent();
19 if (previewEntityComponent)
20 previewEntityComponent.GetOnPreviewCreate().Insert(OnPreviewCreated);
21
22 GetGame().GetCallqueue().CallLater(DelayedHighlight, 1500, false);
23 PlayNarrativeCharacterStage("SQUADLEADERSHIP_Instructor", 3);
24 }
25
26 //------------------------------------------------------------------------------------------------
27 protected void OnPreviewCreated(SCR_EditablePreviewEntity previewEntity)
28 {
29 m_bPreviewSelected = true;
30 }
31
32 //------------------------------------------------------------------------------------------------
33 protected void DelayedHighlight()
34 {
35 Widget w = GetGame().GetWorkspace().FindAnyWidget("ContentBrowser_AssetCard");
36 m_wHighlight = SCR_WidgetHighlightUIComponent.CreateHighlight(w, "{D574871D2C37B255}UI/layouts/Common/WidgetHighlight.layout");
37 }
38
39 //------------------------------------------------------------------------------------------------
40 override protected bool GetIsFinished()
41 {
42 return m_bPreviewSelected || GetGame().GetWorld().FindEntityByName(m_sSpawnedEntityName);
43 }
44
45 //------------------------------------------------------------------------------------------------
47 {
48 SCR_PreviewEntityEditorComponent previewEntityComponent = m_TutorialComponent.GetPreviewEntityComponent();
49 if (previewEntityComponent)
50 previewEntityComponent.GetOnPreviewCreate().Remove(OnPreviewCreated);
51
52 GetGame().GetCallqueue().Remove(DelayedHighlight);
53 delete m_wHighlight;
54 }
55}
ArmaReforgerScripted GetGame()
Definition game.c:1398
void OnPreviewCreated(SCR_EditablePreviewEntity previewEnt)
Method called when the preview of prefab to build is created.
enum SCR_ECompassType EntityEditorProps(category:"GameScripted/Gadgets", description:"Compass", color:"0 0 255 255")
Prefab data class for compass component.
SCR_Tutorial_CombatEngineering_SelectPrefab_1Class m_wHighlight
void ~SCR_Tutorial_SquadLeadership_SelectGroup()
SCR_TutorialGamemodeComponent m_TutorialComponent
void PlayNarrativeCharacterStage(string characterName, int stage)
static Widget CreateHighlight(Widget widget, ResourceName layout, Widget parent=null)