### Implement Campaign Tutorial Stage with Vehicle Entry Setup
Source: https://arexplorer.zeroy.com/_s_c_r___campaign_tutorial_arland_stage95_8c_source
Implements SCR_CampaignTutorialArlandStage95 class that inherits from SCR_BaseCampaignTutorialArlandStage. The Setup() method registers a waypoint, sets completion radius to 10 units, and displays a hint guiding players to approach a vehicle and enter from the driver side using interaction prompts.
```C
class SCR_CampaignTutorialArlandStage95 : SCR_BaseCampaignTutorialArlandStage
{
ovide protected void Setup()
{
RegisterWaypoint("WP_GETINHMW");
m_fWaypointCompletionRadius = 10;
string hintString = "First, approach the vehicle on the Driver side and get in. You should be able to see an interaction on the door." + CreateString("Get in vehicle","CharacterAction") + CreateString("#AR-KeybindEditor_MultiSelection","SelectAction");
SCR_HintManagerComponent.ShowCustomHint(hintString, "", -1);
}
};
```
--------------------------------
### SCR_TutorialConflictCapture1 Class Definition and Setup
Source: https://arexplorer.zeroy.com/_s_c_r___tutorial_conflict_capture1_8c_source
Defines the SCR_TutorialConflictCapture1 class, inheriting from SCR_BaseCampaignTutorialArlandStage. The Setup method initializes stage parameters like duration and condition checking, resets seizing logic, hides hints, and schedules a sound effect for the start of the conflict.
```c++
class SCR_TutorialConflictCapture1Class: SCR_BaseCampaignTutorialArlandStageClass
{
};
class SCR_TutorialConflictCapture1 : SCR_BaseCampaignTutorialArlandStage
{
override protected void Setup()
{
m_fDuration = 5;
m_bConditionPassCheck = true;
if (!m_TutorialComponent)
return;
m_TutorialComponent.StageReset_ResetSeizing();
SCR_HintManagerComponent.HideHint();
SCR_HintManagerComponent.ClearLatestHint();
GetGame().GetCallqueue().CallLater(PlaySoundSystem, 2000, false, "Conflict_Start", false);
}
};
```
--------------------------------
### Implement SCR_CampaignTutorialArlandDrivingAdvanced5 Setup
Source: https://arexplorer.zeroy.com/_s_c_r___campaign_tutorial_arland_driving_advanced5_8c_source
Overrides the Setup function within the SCR_CampaignTutorialArlandDrivingAdvanced5 class. This function registers a waypoint, sets a completion radius, sets an image, and displays a tutorial hint to the user, guiding them through the driving tutorial stage.
```C++
override protected void Setup()
{
RegisterWaypoint("WP_DRIVINGHEAVY_4");
m_fWaypointCompletionRadius = 10;
m_TutorialComponent.SetWaypointMiscImage("CHICANE", true);
SCR_HintManagerComponent.ShowHint(m_TutorialHintList.GetHint(m_TutorialComponent.GetStage()));
}
```
--------------------------------
### SCR_CampaignTutorialArlandStage94 Class Definition and Setup
Source: https://arexplorer.zeroy.com/_s_c_r___campaign_tutorial_arland_stage94_8c_source
Defines the SCR_CampaignTutorialArlandStage94 class, inheriting from SCR_BaseCampaignTutorialArlandStage. The Setup method initializes the tutorial stage by setting its duration and displaying a custom hint message to the player. This function is essential for guiding the player through the initial steps of the driving tutorial.
```cpp
class SCR_CampaignTutorialArlandStage94Class: SCR_BaseCampaignTutorialArlandStageClass
{
};
class SCR_CampaignTutorialArlandStage94 : SCR_BaseCampaignTutorialArlandStage
{
override protected void Setup()
{
m_fDuration = 9;
string hintString = "Welcome to the Driving school. Here you will learn the fundementals of interacting with vehicles.";
SCR_HintManagerComponent.ShowCustomHint(hintString, "", m_fDuration, isTimerVisible:true);
}
};
```
--------------------------------
### Get Max Starting Supplies
Source: https://arexplorer.zeroy.com/_s_c_r___game_mode_campaign_8c_source
This function returns the maximum number of starting supplies a player or faction can have. It's a configuration value likely used in campaign setup or resource management systems.
```SCR_GameModeCampaign.c
int GetMaxStartingSupplies()
```
--------------------------------
### Initialize Tutorial Stage Setup with Sound and Hints
Source: https://arexplorer.zeroy.com/_s_c_r___tutorial_conflict_capture15_8c_source
Implements the Setup() method to initialize the tutorial stage by hiding previous hints, playing a radio pickup sound effect, and scheduling a delayed popup notification. It also configures the inventory component to monitor radio item additions.
```C
override protected void Setup()
{
SCR_HintManagerComponent.HideHint();
SCR_HintManagerComponent.ClearLatestHint();
PlaySoundSystem("Conflict_RadioPickup", true);
HintOnVoiceOver();
GetGame().GetCallqueue().CallLater(DelayedPopup, 10000, false, "#AR-Tutorial_Popup_Title-UC", "#AR-Tutorial_Popup_Radios", 10, "", "", "", "");
SCR_InventoryStorageManagerComponent comp = SCR_InventoryStorageManagerComponent.Cast(m_Player.FindComponent(SCR_InventoryStorageManagerComponent));
if (comp)
{
comp.m_OnItemAddedInvoker.Remove(m_TutorialComponent.CheckRadioPickup);
comp.m_OnItemAddedInvoker.Insert(m_TutorialComponent.CheckRadioPickup);
}
}
```
--------------------------------
### SCR_EvacuateTask: Get Minimum Distance from Start (Squirrel)
Source: https://arexplorer.zeroy.com/_s_c_r___evacuate_task_8c_source
Retrieves the minimum distance required from the task's start origin. It checks for a TaskManager and a specific support entity to get this value, returning a default of 1000 if not found.
```Squirrel
static float GetMinDistanceFromStart()
{
if (!GetTaskManager())
return 1000;
SCR_EvacuateTaskSupportEntity supportEntity = SCR_EvacuateTaskSupportEntity.Cast(GetTaskManager().FindSupportEntity(SCR_EvacuateTaskSupportEntity));
if (supportEntity)
return supportEntity.GetMinDistanceFromStart();
return 1000;
}
```
--------------------------------
### SCR_TutorialNavigation9 Setup and Logic
Source: https://arexplorer.zeroy.com/_s_c_r___tutorial_navigation9_8c_source
Implements the SCR_TutorialNavigation9 class, including the Setup and GetIsFinished methods. This section initializes components like the player's inventory, manages hints and sounds, and determines the completion status of the navigation tutorial based on the player's equipment and actions.
```cpp
class SCR_TutorialNavigation9 : SCR_BaseCampaignTutorialArlandStage
{
SCR_CharacterInventoryStorageComponent m_PlayerInventory;
//------------------------------------------------------------------------------------------------
override protected void Setup()
{
SCR_HintManagerComponent.HideHint();
SCR_HintManagerComponent.ClearLatestHint();
m_PlayerInventory = SCR_CharacterInventoryStorageComponent.Cast(m_Player.FindComponent(SCR_CharacterInventoryStorageComponent));
SCR_MapEntity.GetOnMapClose().Remove(m_TutorialComponent.OnMapClose);
SCR_MapEntity.GetOnMapClose().Insert(m_TutorialComponent.OnMapClose);
PlaySoundSystem("Navigation_CompassInGameGadget");
HintOnVoiceOver();
}
//------------------------------------------------------------------------------------------------
override protected bool GetIsFinished()
{
if (!m_PlayerInventory)
return false;
IEntity ent = m_PlayerInventory.GetCurrentItem();
if (!ent)
return false;
SCR_CompassComponent compassComp = SCR_CompassComponent.Cast(ent.FindComponent(SCR_CompassComponent));
if (!compassComp)
return false;
return compassComp;
}
};
```
--------------------------------
### SCR_EvacuateTask: Get Start Origin (Squirrel)
Source: https://arexplorer.zeroy.com/_s_c_r___evacuate_task_8c_source
Returns the current start origin of the evacuation task.
```Squirrel
vector GetStartOrigin()
{
return m_vStartOrigin;
}
```
--------------------------------
### Implement Tutorial Stage Setup and Initialization - C
Source: https://arexplorer.zeroy.com/_s_c_r___campaign_tutorial_arland_stage_movement10_8c_source
Implements the Setup() method for the movement tutorial stage, configuring waypoints, completion radius, height offsets, and conditional camera switching hints. This method initializes all necessary components for the wall climbing tutorial, including sound playback and visual guidance.
```C
override protected void Setup()
{
RegisterWaypoint("WP_WALL");
m_fWaypointCompletionRadius = 5;
m_fWaypointHeightOffset = 0.3;
SCR_HintManagerComponent.HideHint();
SCR_HintManagerComponent.ClearLatestHint();
if (!m_TutorialComponent.GetWas3rdPersonViewUsed())
GetGame().GetCallqueue().CallLater(DelayedPopup, 2000, false, "#AR-Tutorial_Popup_Title-UC", "#AR-Tutorial_Popup_Camera", 7, "", "", "", "");
PlaySoundSystem("Walls", true);
HintOnVoiceOver();
m_TutorialComponent.SetWaypointMiscImage("JUMP", true);
}
```
--------------------------------
### Setup Method for Tutorial Stage Initialization
Source: https://arexplorer.zeroy.com/_s_c_r___base_tour_stage_8c_source
The Setup method initializes the tutorial stage by setting up waypoints, managing hints, playing sounds, and finding specific game entities. It registers various service points like antennas and armories, and updates the tutorial component's stage completion status.
```cpp
override protected void Setup()
{
m_bCheckWaypoint = false;
RegisterWaypoint("TeleportRadio");
SCR_HintManagerComponent.HideHint();
SCR_HintManagerComponent.ClearLatestHint();
GetGame().GetCallqueue().CallLater(PlaySoundSystem, 2000, false, "BaseTour_Start", false);
GetGame().GetCallqueue().CallLater(HintOnVoiceOver, 2000, false);
m_AntennaPos = GetGame().GetWorld().FindEntityByName("WP_Tour_Antenna");
if (m_AntennaPos)
RegisterWaypoint(m_AntennaPos);
m_ArmoryPos = GetGame().GetWorld().FindEntityByName("WP_Tour_Armory");
if (m_ArmoryPos)
RegisterWaypoint(m_ArmoryPos);
m_FieldHospitalPos = GetGame().GetWorld().FindEntityByName("WP_Tour_FieldHospital");
if (m_FieldHospitalPos)
RegisterWaypoint(m_FieldHospitalPos);
m_FuelDepotPos = GetGame().GetWorld().FindEntityByName("WP_Tour_FuelDepot");
if (m_FuelDepotPos)
RegisterWaypoint(m_FuelDepotPos);
m_HQPos = GetGame().GetWorld().FindEntityByName("WP_Tour_HQ");
if (m_HQPos)
RegisterWaypoint(m_HQPos);
m_LivingQuartersPos = GetGame().GetWorld().FindEntityByName("WP_Tour_LivingQuarters");
if (m_LivingQuartersPos)
RegisterWaypoint(m_LivingQuartersPos);
m_LightVehDepotPos = GetGame().GetWorld().FindEntityByName("WP_Tour_LightVehDepot");
if (m_LightVehDepotPos)
RegisterWaypoint(m_LightVehDepotPos);
m_HeavyVehDepotPos = GetGame().GetWorld().FindEntityByName("WP_Tour_HeavyVehDepot");
if (m_HeavyVehDepotPos)
RegisterWaypoint(m_HeavyVehDepotPos);
m_HeliportPos = GetGame().GetWorld().FindEntityByName("WP_Tour_Heliport");
if (m_HeliportPos)
RegisterWaypoint(m_HeliportPos);
GetGame().GetCallqueue().CallLater(CheckVicinity, 1000, true);
IEntity base = GetGame().GetWorld().FindEntityByName("MainBaseHQ");
if (!base)
return;
SCR_CampaignMilitaryBaseComponent baseComp = SCR_CampaignMilitaryBaseComponent.Cast(base.FindComponent(SCR_CampaignMilitaryBaseComponent));
if (baseComp)
baseComp.SetSupplies(0);
m_TutorialComponent.SetStagesComplete(7, true);
}
```
--------------------------------
### BaseTransceiver: Get On Started Event
Source: https://arexplorer.zeroy.com/_s_c_r___game_mode_campaign_8c_source
Retrieves the ScriptInvoker for the 'OnStarted' event. This event is triggered when the Conflict gamemode has started, allowing other systems to react.
```C++
ScriptInvoker GetOnStarted()
// Definition: BaseTransceiver.c:12
```
--------------------------------
### SCR_TutorialNavigation10 Class Definition and Setup
Source: https://arexplorer.zeroy.com/_s_c_r___tutorial_navigation10_8c_source
Defines the SCR_TutorialNavigation10 class, inheriting from SCR_BaseCampaignTutorialArlandStage. The Setup method initializes tutorial states by hiding hints, setting a check period, playing a sound, and triggering voiceover.
```c
class SCR_TutorialNavigation10Class: SCR_BaseCampaignTutorialArlandStageClass
{
};
class SCR_TutorialNavigation10 : SCR_BaseCampaignTutorialArlandStage
{
override protected void Setup()
{
SCR_HintManagerComponent.HideHint();
SCR_HintManagerComponent.ClearLatestHint();
m_fConditionCheckPeriod = 1;
PlaySoundSystem("Navigation_CompassNorth", true);
HintOnVoiceOver();
}
};
```
--------------------------------
### Game Start Function in SCR_GameModeCampaign
Source: https://arexplorer.zeroy.com/_s_c_r___game_mode_campaign_8c
Initiates the game start sequence. This protected function is called internally to begin the game after necessary setups are completed.
```cpp
protected void Start( )
// Definition at line 465 of file SCR_GameModeCampaign.c.
```
--------------------------------
### Get Game Start/End Invokers in GameMode
Source: https://arexplorer.zeroy.com/_s_c_r___base_game_mode_8c_source
Provides access to the game start and end event invokers. These invokers are used to trigger actions when a game starts or ends.
```Squirrel
573 ScriptInvoker GetOnGameStart()
574 {
575 return Event_OnGameStart;
576 }
577 ScriptInvoker GetOnGameEnd()
578 {
579 return m_OnGameEnd;
580 }
```
--------------------------------
### Initialize Tutorial Stage with HUD Management
Source: https://arexplorer.zeroy.com/_s_c_r___tutorial_conflict_capture9_8c_source
The Setup method initializes a tutorial stage by retrieving the HUD manager, finding the XPInfoDisplay, and enabling it. It also sets the duration of the stage and displays a tutorial hint. Dependencies include SCR_HUDManagerComponent and SCR_XPInfoDisplay.
```c++
class SCR_TutorialConflictCapture9 : SCR_BaseCampaignTutorialArlandStage
{
override protected void Setup()
{
SCR_HUDManagerComponent hudManager = GetGame().GetHUDManager();
if (hudManager)
{
SCR_XPInfoDisplay display = SCR_XPInfoDisplay.Cast(hudManager.FindInfoDisplay(SCR_XPInfoDisplay));
if (display)
display.AllowShowingInfo(true);
}
m_fDuration = 20;
SCR_HintManagerComponent.ShowHint(m_TutorialHintList.GetHint(m_TutorialComponent.GetStage()));
}
};
```
--------------------------------
### SCR_CampaignTutorialArlandDrivingAdvanced3 Class Definition and Setup
Source: https://arexplorer.zeroy.com/_s_c_r___campaign_tutorial_arland_driving_advanced3_8c_source
Defines the SCR_CampaignTutorialArlandDrivingAdvanced3 class, inheriting from SCR_BaseCampaignTutorialArlandStage. The Setup method initializes the tutorial by registering a waypoint, setting a completion radius, and playing a sound effect, either immediately or after a delay if the voice system is already active.
```csharp
class SCR_CampaignTutorialArlandDrivingAdvanced3Class: SCR_BaseCampaignTutorialArlandStageClass
{
};
class SCR_CampaignTutorialArlandDrivingAdvanced3 : SCR_BaseCampaignTutorialArlandStage
{
override protected void Setup()
{
RegisterWaypoint("WP_DRIVINGHEAVY_2");
m_fWaypointCompletionRadius = 10;
if (!m_TutorialComponent.GetVoiceSystem().IsPlaying())
PlaySoundSystem("DrivingWet", true);
else
GetGame().GetCallqueue().CallLater(PlaySoundSystem, 1000, false, "DrivingWet", true);
}
};
```
--------------------------------
### Initialize Display Start Draw Phase
Source: https://arexplorer.zeroy.com/_s_c_r___info_display_extended_8c
Returns boolean indicating successful initialization of the start draw phase. Performs validation and setup checks before drawing begins.
```C
protected bool DisplayStartDrawInit(IEntity _owner_)
```
--------------------------------
### Implement Examples UI Logic in C
Source: https://arexplorer.zeroy.com/dir_4764fc47c71ac612a5c3c4cec9313ce3
Contains example implementations or UI components for demonstration purposes. This script serves as a reference for developers.
```c
/*
* Examples
*/
// Placeholder for Example UI logic
void ShowExampleUI() {
// Implementation details would go here
}
```
--------------------------------
### SCR_TutorialNavigation14 Class Definition and Setup Method
Source: https://arexplorer.zeroy.com/_s_c_r___tutorial_navigation14_8c_source
Defines the SCR_TutorialNavigation14 class, inheriting from SCR_BaseCampaignTutorialArlandStage. The Setup method initializes tutorial parameters, finds a specific entity by name, calculates its angle, and manages in-game hints and sounds.
```cpp
class SCR_TutorialNavigation14Class: SCR_BaseCampaignTutorialArlandStageClass
{
};
class SCR_TutorialNavigation14 : SCR_BaseCampaignTutorialArlandStage
{
float m_fAngle;
//------------------------------------------------------------------------------------------------
override protected void Setup()
{
m_fConditionCheckPeriod = 1;
IEntity lighthousePos = GetGame().GetWorld().FindEntityByName("TowerPos");
m_fAngle = m_TutorialComponent.GetEntityCompassAngle(lighthousePos);
SCR_HintManagerComponent.HideHint();
SCR_HintManagerComponent.ClearLatestHint();
PlaySoundSystem("Navigation_Compass_Village");
HintOnVoiceOver();
}
//------------------------------------------------------------------------------------------------
override protected bool GetIsFinished()
{
return m_TutorialComponent.IsMyAngleInRange(m_fAngle, 5);
}
};
```
--------------------------------
### Get Voting Start Event Invoker
Source: https://arexplorer.zeroy.com/_s_c_r___voting_manager_component_8c_source
Retrieves the script invoker for voting start events. Returns the m_OnVotingStart invoker which allows listeners to subscribe to voting initialization events.
```SQF/Script
ScriptInvoker_VotingManagerStart GetOnVotingStart()
{
return m_OnVotingStart;
}
```
--------------------------------
### Get Minimum Starting Supplies
Source: https://arexplorer.zeroy.com/_s_c_r___game_mode_campaign_8c
Returns the minimum amount of supplies available at the start of a match. This defines the lower bound for initial resource allocation. Defined in SCR_GameModeCampaign.c.
```C++
int GetMinStartingSupplies()
```
--------------------------------
### Setup Hint Configuration
Source: https://arexplorer.zeroy.com/_s_c_r___base_campaign_tutorial_arland_stage_8c_source
This function loads a hint configuration file and creates an instance of SCR_HintTutorialList. It handles loading from a BaseContainer and creating an instance from it.
```Squirrel
void SetupHintConfig()
{
Resource holder = BaseContainerTools.LoadContainer("{A3567FFC9354E433}Configs/Hints/Tutorial/TutorialHintsFinal.conf");
if (!holder)
return;
BaseContainer container = holder.GetResource().ToBaseContainer();
if (!container)
return;
Managed managed = BaseContainerTools.CreateInstanceFromContainer(container);
if (!managed)
return;
m_TutorialHintList = SCR_HintTutorialList.Cast(managed);
}
```
--------------------------------
### Get Maximum Starting Supplies
Source: https://arexplorer.zeroy.com/_s_c_r___game_mode_campaign_8c
Returns the maximum amount of supplies available at the start of a match. This value influences initial resource allocation for players or factions. Defined in SCR_GameModeCampaign.c.
```C++
int GetMaxStartingSupplies()
```
--------------------------------
### Setup Menu Input and Components
Source: https://arexplorer.zeroy.com/_career_menu_u_i_8c_source
Initializes the menu when it is opened. It sets up input listeners for 'MenuBack', finds and casts components for character preview and loadout statistics, and establishes a callback for loadout changes. It also sets the career UI instance.
```C#
override void OnMenuOpen()
{
Widget w = GetRootWidget();
m_sInstance = this;
InputManager inputManager = GetGame().GetInputManager();
inputManager.AddActionListener( "MenuBack", EActionTrigger.PRESSED, Back );
// Preview character
Widget wCharacterPreview = GetRootWidget().FindAnyWidget(WIDGET_CHARACTER_PREVIEW);
if (wCharacterPreview)
m_LoadoutPreview = SCR_LoadoutPreviewComponent.Cast(wCharacterPreview.FindHandler(SCR_LoadoutPreviewComponent));
//m_LoadoutManager = SCR_LoadoutManager.GetInstance();
// Loadout stats
Widget wLoadoutStats = GetRootWidget().FindAnyWidget(WIDGET_LOADOUT_STATS);
if (wLoadoutStats)
m_LoadoutStatistics = SCR_LoadoutStatisticsComponent.Cast(wLoadoutStats.FindHandler(SCR_LoadoutStatisticsComponent));
if (m_LoadoutStatistics)
{
m_LoadoutStatistics.SetCareerUI(this);
m_LoadoutStatistics.m_OnLoadoutChange.Insert(OnLoadoutChange);
OnLoadoutChange(m_LoadoutStatistics.GetCurrentLoadoutId());
}
super.OnMenuOpen();
}
```
--------------------------------
### Get Journal Setup Configuration in SQF
Source: https://arexplorer.zeroy.com/_s_c_r___respawn_briefing_component_8c_source
This function retrieves the journal setup configuration. It loads the configuration if it hasn't been loaded already and then returns the configuration. This ensures that the configuration is accessible when needed.
```SQF
SCR_JournalSetupConfig GetJournalSetup()
{
if (!m_JournalConfig)
LoadJournalConfig();
return m_JournalConfig;
}
```
--------------------------------
### SCR_TutorialConflictCapture3 Class Definition and Setup
Source: https://arexplorer.zeroy.com/_s_c_r___tutorial_conflict_capture3_8c_source
Defines the SCR_TutorialConflictCapture3 class, inheriting from SCR_BaseCampaignTutorialArlandStage. The Setup method initializes tutorial hints, hides previous ones, displays a new hint, and registers an input action listener for opening the tasks menu. Dependencies include SCR_HintManagerComponent and the game's input manager.
```cpp
//------------------------------------------------------------------------------------------------
class SCR_TutorialConflictCapture3 : SCR_BaseCampaignTutorialArlandStage
{
protected bool m_bTaskMenuOpened;
//------------------------------------------------------------------------------------------------
override protected void Setup()
{
m_fWaypointCompletionRadius = 5;
SCR_HintManagerComponent.HideHint();
SCR_HintManagerComponent.ClearLatestHint();
SCR_HintManagerComponent.ShowHint(m_TutorialHintList.GetHint(m_TutorialComponent.GetStage()));
GetGame().GetInputManager().AddActionListener("TasksOpen", EActionTrigger.DOWN, RegisterTasksShown);
}
//------------------------------------------------------------------------------------------------
override protected bool GetIsFinished()
{
return m_bTaskMenuOpened;
}
//------------------------------------------------------------------------------------------------
void RegisterTasksShown()
{
m_bTaskMenuOpened = true;
GetGame().GetInputManager().RemoveActionListener("TasksOpen", EActionTrigger.DOWN, RegisterTasksShown);
}
};
```
--------------------------------
### Get Starting Supplies Interval
Source: https://arexplorer.zeroy.com/_s_c_r___game_mode_campaign_8c_source
This method returns the interval at which starting supplies are replenished or made available. It's a key parameter for managing in-game economy and resource flow.
```SCR_GameModeCampaign.c
int GetStartingSuppliesInterval()
```
--------------------------------
### Initialize Tutorial Stage Setup Method
Source: https://arexplorer.zeroy.com/_s_c_r___tutorial_conflict_capture20_8c_source
Overrides the Setup method to initialize the tutorial stage by hiding active hints, clearing previous hints, and triggering the Conflict MHQ info sound. This method is called when the tutorial stage begins.
```SQF/C
override protected void Setup()
{
SCR_HintManagerComponent.HideHint();
SCR_HintManagerComponent.ClearLatestHint();
PlaySoundSystem("Conflict_MHQInfo");
}
```
--------------------------------
### Get and Remove Transformation Start Listener (C++)
Source: https://arexplorer.zeroy.com/_s_c_r___editor_transform_hint_condition_8c_source
Retrieves the SCR_TransformingEditorComponent instance and removes a listener for the transformation start event. This code assumes the presence of the SCR_TransformingEditorComponent class and its associated event.
```cpp
SCR_TransformingEditorComponent transformManager = SCR_TransformingEditorComponent.Cast(SCR_TransformingEditorComponent.GetInstance(SCR_TransformingEditorComponent));
if (transformManager)
transformManager.GetOnTransformationStart().Remove(Activate);
```
--------------------------------
### Initialize Introduction Page Content with Widgets
Source: https://arexplorer.zeroy.com/_s_c_r___welcome_screen_component_8c_source
Initializes the introduction screen by populating widgets with content from the first introduction page. Finds and casts ImageWidget, RichTextWidget components, loads image textures, and sets text content. Sets up pagination visibility based on total introduction count.
```Cpp
if (!contentVertical)
return;
ImageWidget imageWidget = ImageWidget.Cast(contentVertical.FindAnyWidget("ImageWidget"));
if (imageWidget && introductionPages[0].GetImage())
imageWidget.LoadImageTexture(0, introductionPages[0].GetImage(), false, false);
RichTextWidget titleText = RichTextWidget.Cast(contentVertical.FindAnyWidget("TitleText"));
if (titleText)
titleText.SetText(introductionPages[0].GetTitleText());
RichTextWidget descriptionText = RichTextWidget.Cast(contentVertical.FindAnyWidget("DescriptionText"));
if (descriptionText)
descriptionText.SetText(introductionPages[0].GetDescriptionText());
Widget pages = m_wIntroductionContentWidget.FindAnyWidget("Pages");
if (!pages)
return;
SCR_SelectionHintComponent pagesVisualised = SCR_SelectionHintComponent.Cast(pages.FindHandler(SCR_SelectionHintComponent));
if (!pagesVisualised)
return;
Widget pagination = m_wIntroductionContentWidget.FindAnyWidget("Pagination");
if (!pagination)
return;
if (introductionCount == 1)
{
pagination.SetOpacity(0);
}
else
{
pagesVisualised.SetItemCount(introductionCount);
InitPagination();
HandlePagination();
}
```
--------------------------------
### Start Campaign Initialization - C++
Source: https://arexplorer.zeroy.com/_s_c_r___game_mode_campaign_8c_source
Protected method that initializes and starts the campaign game mode. Performs setup operations and transitions the campaign from initialized state to active running state.
```c++
protected void Start()
```
--------------------------------
### Implement Tutorial Setup Method in Navigation Stage
Source: https://arexplorer.zeroy.com/_s_c_r___tutorial_navigation15_8c_source
Implements the Setup method to initialize the tutorial navigation stage by hiding hints, clearing previous hints, setting condition check period, registering map event listeners, and triggering navigation audio and voice-over. This method is called when the tutorial stage begins.
```Arma Script
override protected void Setup()
{
SCR_HintManagerComponent.HideHint();
SCR_HintManagerComponent.ClearLatestHint();
m_fConditionCheckPeriod = 1;
SCR_MapEntity.GetOnMapOpen().Remove(m_TutorialComponent.OnMapOpen);
SCR_MapEntity.GetOnMapClose().Remove(m_TutorialComponent.OnMapClose);
SCR_MapEntity.GetOnMapOpen().Insert(m_TutorialComponent.OnMapOpen);
SCR_MapEntity.GetOnMapClose().Insert(m_TutorialComponent.OnMapClose);
PlaySoundSystem("Navigation_OrientationOpenMap");
HintOnVoiceOver();
}
```
--------------------------------
### Initialize Tutorial Navigation Stage - Arma Reforger Script
Source: https://arexplorer.zeroy.com/_s_c_r___tutorial_navigation1_8c_source
Implements the Setup() override method to initialize the tutorial stage by hiding/clearing hints, setting duration to 5 seconds, spawning an M998 vehicle asset, and scheduling a sound system call. This method prepares the navigation tutorial experience for the player.
```c
override protected void Setup()
{
SCR_HintManagerComponent.HideHint();
SCR_HintManagerComponent.ClearLatestHint();
m_fDuration = 5;
m_bConditionPassCheck = true;
m_TutorialComponent.SpawnAsset("Navigation_car", "{5674FAEB9AB7BDD0}Prefabs/Vehicles/Wheeled/M998/M998.et");
GetGame().GetCallqueue().CallLater(PlaySoundSystem, 2000, false, "Navigation_Start", false);
}
```
--------------------------------
### Get Resource GUID
Source: https://arexplorer.zeroy.com/_s_c_r___config_helper_8c_source
Extracts the GUID from a ResourceName string. It finds the closing brace '}' and extracts the substring. Optionally removes the surrounding brackets. Dependencies: ResourceName, string.
```csharp
static string GetGUID(ResourceName resourceName, bool removeBrackets = false)
{
int guidIndex = resourceName.LastIndexOf("}");
if (guidIndex < 0)
return string.Empty;
if (removeBrackets)
return resourceName.Substring(1, guidIndex - 1);
else
return resourceName.Substring(0, guidIndex + 1);
}
```
--------------------------------
### Get Voting Start Notification ID - C#
Source: https://arexplorer.zeroy.com/_s_c_r___voting_u_i_info_8c_source
Retrieves the identifier for the notification displayed when a vote begins. This allows the game to trigger specific UI or sound effects for the start of a voting process.
```csharp
ENotification GetVotingStartNotification()
{
return m_iStartNotificationId;
}
```
--------------------------------
### Setup Function in C++
Source: https://arexplorer.zeroy.com/_s_c_r___base_campaign_tutorial_arland_stage_8c_source
This is a protected function which appears to be designed for setting up the tutorial. Currently, it is empty, indicating a potential placeholder for initialization logic or resource loading related to the tutorial stage.
```C++
protected void Setup()
{
}
```
--------------------------------
### Get Setup Optic Image Invoker
Source: https://arexplorer.zeroy.com/_s_c_r__2_d_optics_component_8c_source
Returns the ScriptInvoker for optic image setup events. This is used to signal when the optic's visual representation needs to be set up or updated.
```cpp
ScriptInvokerVoid OnSetupOpticImage()
{
return s_OnSetupOpticImage;
}
```
--------------------------------
### Implement Tutorial Stage Setup with Sound and Hints
Source: https://arexplorer.zeroy.com/_s_c_r___tutorial_conflict_capture19_8c_source
Overrides the Setup method to initialize the Conflict Capture 19 tutorial stage by clearing hints, playing the MHQ Deploy sound, and triggering voice-over hints. This method is called when the tutorial stage begins and prepares the audio-visual feedback for the player.
```C
override protected void Setup()
{
SCR_HintManagerComponent.HideHint();
SCR_HintManagerComponent.ClearLatestHint();
PlaySoundSystem("Conflict_MHQDeploy", true);
HintOnVoiceOver();
}
```
--------------------------------
### Game Start Initialization
Source: https://arexplorer.zeroy.com/_s_c_r___game_core_base_8c_source
Handles the initialization logic that runs when the game starts. This function is called after the world is initialized but before the first game ticks, making it ideal for setup tasks.
```C++
override bool OnGameStart()
{
// Gets called after world is initialized but before first ticks.
// Definition: game.c:621
}
```
--------------------------------
### SCR_TutorialBallistic2 Class Definition and Setup
Source: https://arexplorer.zeroy.com/_s_c_r___tutorial_ballistic2_8c_source
Defines the SCR_TutorialBallistic2 class, extending SCR_BaseCampaignTutorialArlandStage. The Setup method initializes tutorial parameters like duration, condition checking, and sound system actions.
```cpp
class SCR_TutorialBallistic2Class: SCR_BaseCampaignTutorialArlandStageClass
{
};
class SCR_TutorialBallistic2: SCR_BaseCampaignTutorialArlandStage
{
//------------------------------------------------------------------------------------------------
override protected void Setup()
{
m_fDuration = 10;
m_bConditionPassCheck = true;
SCR_HintManagerComponent.HideHint();
SCR_HintManagerComponent.ClearLatestHint();
PlaySoundSystem("Balistic", true);
}
//------------------------------------------------------------------------------------------------
override bool GetIsFinished()
{
return !m_TutorialComponent.GetVoiceSystem().IsPlaying();
}
};
```
--------------------------------
### Initialize UI for Download Action
Source: https://arexplorer.zeroy.com/_s_c_r___download_manager___addon_download_line_8c_source
Sets up UI for a standard workshop item download action. Stores the action reference, performs immediate update, and schedules periodic updates every 20ms to reflect download progress.
```cpp
void InitForDownloadAction(SCR_WorkshopItemActionDownload action)
{
m_Action = action;
Update();
GetGame().GetCallqueue().CallLater(Update, 20, true);
}
```
--------------------------------
### Get Action Name for Starting Round
Source: https://arexplorer.zeroy.com/_s_c_r___set_targets_mode_user_action_8c_source
Provides the localized name for the action that starts the firing range round. This function is expected to return true and set the output string with the action's name.
```cpp
override bool GetActionNameScript(out string outName)
{
outName = ("#AR-FiringRange_ActionStartRound-UC");
return true;
}
```
--------------------------------
### Initialize Keybind Dialog with Action Display Setup
Source: https://arexplorer.zeroy.com/_s_c_r___simple_keybind_dialog_u_i_8c_source
Initializes the keybind dialog UI by setting up the close hint text, message color, and scheduling action display frame calculations. Calls Setup() method and configures the visual elements including widget visibility and text localization. Uses a delayed frame call to ensure proper screen size calculation.
```c
m_wCloseHint.SetText(WidgetManager.Translate(CLOSE_HINT, actionText));
}
SetMessageColor(Color.FromInt(UIColors.NEUTRAL_ACTIVE_STANDBY.PackToInt()));
GetMessageWidget().SetVisible(m_bShowOverrideWarning);
// Wait a frame for the action name text to be initialized, we need it's screen size
GetGame().GetCallqueue().Call(SetupActionDisplayFrameSkip);
```
--------------------------------
### Get Name Edit Start Event Invoker (C#)
Source: https://arexplorer.zeroy.com/_s_c_r___addon_line_preset_component_8c_source
Retrieves or initializes the `ScriptInvoker` for the `Event_OnNameEditStart` event.
```csharp
ScriptInvoker GetEventOnNameEditStart()
{
if (!Event_OnNameEditStart)
Event_OnNameEditStart = new ScriptInvoker();
return Event_OnNameEditStart;
}
```
--------------------------------
### Get Starting Index for Player List
Source: https://arexplorer.zeroy.com/_s_c_r___faction_player_list_8c_source
Calculates the starting index for fetching players based on the currently selected page in the spinbox. Handles the case where the current page is the first page (index 0).
```C++
protected int GetStartingIndex()
{
int page = m_SpinBoxComp.GetCurrentIndex();
if (page < 1)
return 0;
return page * m_iEntriesPerPage;
}
```
--------------------------------
### Implement Setup Method for Navigation Tutorial
Source: https://arexplorer.zeroy.com/_s_c_r___tutorial_navigation13_8c_source
Initializes the tutorial stage by setting the condition check period, retrieving the target entity position (lighthouse), calculating the compass angle, hiding previous hints, and triggering audio/voiceover cues. This method prepares the tutorial environment for compass navigation training.
```C
override protected void Setup()
{
m_fConditionCheckPeriod = 1;
IEntity lighthousePos = GetGame().GetWorld().FindEntityByName("VillagePos");
m_fAngle = m_TutorialComponent.GetEntityCompassAngle(lighthousePos);
SCR_HintManagerComponent.HideHint();
SCR_HintManagerComponent.ClearLatestHint();
PlaySoundSystem("Navigation_Compass_Church");
HintOnVoiceOver();
}
```
--------------------------------
### SCR_BuildingTutorialStage17: Setup and Resource Management
Source: https://arexplorer.zeroy.com/_s_c_r___building_tutorial_stage17_8c_source
This snippet defines the SCR_BuildingTutorialStage17 class, inheriting from SCR_BaseCampaignTutorialArlandStage. It implements methods for setting up the tutorial stage, specifically focusing on managing a supply consumer. The Setup() method initializes waypoints and plays sounds, while SetupSupplyConsumer() finds and configures a resource component on a 'BuildingSupplyTruck' entity. The GetIsFinished() method checks if the supply requirements for the stage have been met.
```typescript
class SCR_BuildingTutorialStage17 : SCR_BaseCampaignTutorialArlandStage
{
protected SCR_ResourceEncapsulator m_SupplyEncapsulator;
//------------------------------------------------------------------------------------------------
override protected void Setup()
{
IEntity supplyTruck = GetGame().GetWorld().FindEntityByName("BuildingSupplyTruck");
RegisterWaypoint("supplyTruck");
m_bCheckWaypoint = false;
SetupSupplyConsumer();
SCR_HintManagerComponent.HideHint();
SCR_HintManagerComponent.ClearLatestHint();
PlaySoundSystem("Building_Unload");
HintOnVoiceOver();
}
//------------------------------------------------------------------------------------------------
protected void SetupSupplyConsumer()
{
IEntity supplyTruck = GetGame().GetWorld().FindEntityByName("BuildingSupplyTruck");
if (!supplyTruck)
return;
SlotManagerComponent slotManager = SlotManagerComponent.Cast(supplyTruck.FindComponent(SlotManagerComponent));
if (!slotManager)
return;
EntitySlotInfo slotInfo = slotManager.GetSlotByName("Cargo");
if (!slotInfo)
return;
IEntity cargo = slotInfo.GetAttachedEntity();
if (!cargo)
return;
SCR_ResourceComponent resourceComp = SCR_ResourceComponent.FindResourceComponent(cargo);
if (!resourceComp)
return;
m_SupplyEncapsulator = resourceComp.GetEncapsulator(EResourceType.SUPPLIES);
}
//------------------------------------------------------------------------------------------------
override protected bool GetIsFinished()
{
if (!m_SupplyEncapsulator)
return false;
return m_SupplyEncapsulator.GetAggregatedResourceValue() == 0;
}
};
```
--------------------------------
### Get Zone Start Distance Method
Source: https://arexplorer.zeroy.com/_s_c_r___name_tag_config_8c_source
Getter method that returns the starting distance in metres for a name tag zone. Used to determine when name tag elements should begin rendering based on distance calculations.
```C
int GetZoneStart()
{
return m_iZoneStart;
}
```
--------------------------------
### SCR_TutorialConflictCapture5 Class Definition and Setup Logic
Source: https://arexplorer.zeroy.com/_s_c_r___tutorial_conflict_capture5_8c_source
Defines the SCR_TutorialConflictCapture5 class, inheriting from SCR_BaseCampaignTutorialArlandStage. The Setup method initializes a campaign task for capturing a specific military base, and displays a tutorial hint. It includes checks for necessary components and game state.
```cpp
class SCR_TutorialConflictCapture5Class: SCR_BaseCampaignTutorialArlandStageClass
{
};
class SCR_TutorialConflictCapture5 : SCR_BaseCampaignTutorialArlandStage
{
SCR_CampaignTask m_Task;
override protected void Setup()
{
if (!GetTaskManager())
return;
SCR_CampaignMilitaryBaseComponent baseBeauregard = SCR_CampaignMilitaryBaseComponent.Cast(GetGame().GetWorld().FindEntityByName("TownBaseBeauregard").FindComponent(SCR_CampaignMilitaryBaseComponent));
if (!baseBeauregard)
return;
SCR_CampaignTaskSupportEntity supportClass = SCR_CampaignTaskSupportEntity.Cast(GetTaskManager().FindSupportEntity(SCR_CampaignTaskSupportEntity));
if (!supportClass)
return;
m_Task = supportClass.GetTask(baseBeauregard, SCR_GameModeCampaign.GetInstance().GetFactionByEnum(SCR_ECampaignFaction.BLUFOR), SCR_CampaignTaskType.CAPTURE);
SCR_HintManagerComponent.ShowHint(m_TutorialHintList.GetHint(m_TutorialComponent.GetStage()));
}
// Other methods...
};
```
--------------------------------
### SCR_CampaignTutorialArlandStage105 Class Definition and Setup
Source: https://arexplorer.zeroy.com/_s_c_r___campaign_tutorial_arland_stage105_8c_source
Defines the SCR_CampaignTutorialArlandStage105 class, overriding the Setup method to register waypoints, set completion radius and height offset, and schedule a delayed pop-up notification. This functionality is crucial for guiding players through specific tutorial stages.
```csharp
class SCR_CampaignTutorialArlandStage105 : SCR_BaseCampaignTutorialArlandStage
{
//------------------------------------------------------------------------------------------------
override protected void Setup()
{
RegisterWaypoint("WP_DRIVING_27");
m_fWaypointCompletionRadius = 20;
m_fWaypointHeightOffset = 0;
GetGame().GetCallqueue().CallLater(DelayedPopup, 1000, false, "#AR-Tutorial_Popup_Title-UC", "#AR-Tutorial_Popup_HintToggle", 12, "", "", "", "");
}
//------------------------------------------------------------------------------------------------
override protected bool GetIsFinished()
{
return m_Player.IsInVehicle();
}
};
```
--------------------------------
### Handler and Invoker Retrieval Functions
Source: https://arexplorer.zeroy.com/_s_c_r___info_display_8c
Functions to get the handler for a specific type and the invokers for start and stop events.
```APIDOC
## Function Documentation
### ◆ GetHandler()
SCR_InfoDisplayHandler GetHandler(typename handlerType)
Definition at line 80 of file SCR_InfoDisplay.c.
### ◆ GetOnStart()
SCR_InfoDisplayInvoker GetOnStart(void)
Definition at line 92 of file SCR_InfoDisplay.c.
### ◆ GetOnStop()
SCR_InfoDisplayInvoker GetOnStop(void)
Definition at line 98 of file SCR_InfoDisplay.c.
```
--------------------------------
### SCR_TutorialConflictCapture6: Setup and Finish Logic (C++)
Source: https://arexplorer.zeroy.com/_s_c_r___tutorial_conflict_capture6_8c_source
This snippet defines the SCR_TutorialConflictCapture6 class, which extends SCR_BaseCampaignTutorialArlandStage. The Setup method hides hints and plays a sound, while the GetIsFinished method checks if the tutorial component's voice system is still playing.
```cpp
class SCR_TutorialConflictCapture6 : SCR_BaseCampaignTutorialArlandStage
{
//------------------------------------------------------------------------------------------------
override protected void Setup()
{
SCR_HintManagerComponent.HideHint();
SCR_HintManagerComponent.ClearLatestHint();
PlaySoundSystem("Conflict_VolunteerInfo");
}
//------------------------------------------------------------------------------------------------
override bool GetIsFinished()
{
return !m_TutorialComponent.GetVoiceSystem().IsPlaying();
}
};
```
--------------------------------
### GetHoursMinutesSeconds API
Source: https://arexplorer.zeroy.com/group___world
Retrieves the current time of the day in hours, minutes, and seconds. Example usage demonstrates setting and getting time.
```APIDOC
## GetHoursMinutesSeconds
### Description
Retrieves the current time of the day in hours, minutes, and seconds.
### Method
GET (Assumed based on function name retrieving state)
### Endpoint
/api/time/hms
### Parameters
#### Query Parameters
- **_hours** (int) - Output - The current hour (0-23).
- **_minutes** (int) - Output - The current minute (0-59).
- **_seconds** (int) - Output - The current second (0-59).
### Response
#### Success Response (200)
- **hours** (int) - The current hour (0-23).
- **minutes** (int) - The current minute (0-59).
- **seconds** (int) - The current second (0-59).
#### Response Example
```json
{
"hours": 16,
"minutes": 30,
"seconds": 00
}
```
```
--------------------------------
### Initiate Addon Downloads
Source: https://arexplorer.zeroy.com/_s_c_r___download_manager_8c_source
Creates a download sequence for a list of workshop items and initializes it. It also sets up a callback for when the download sequence is ready.
```C++
void DownloadAddons(array[ items)
{
SCR_DownloadSequence sequence = SCR_DownloadSequence.Create(items, null, true);
sequence.GetOnReady().Insert(OnDownloadAddonsReady);
sequence.Init();
}
```
--------------------------------
### Implement SCR_CampaignTutorialArlandStageMovement1 Setup Method (C++)
Source: https://arexplorer.zeroy.com/_s_c_r___campaign_tutorial_arland_stage_movement1_8c_source
Implements the Setup method for the SCR_CampaignTutorialArlandStageMovement1 class. This method is responsible for initializing tutorial stage elements, including registering waypoints, hiding and clearing hints, and playing a sound effect after a delay.
```cpp
class SCR_CampaignTutorialArlandStageMovement1 : SCR_BaseCampaignTutorialArlandStage
{
//------------------------------------------------------------------------------------------------
override protected void Setup()
{
RegisterWaypoint("WP_ZIGZAG_1");
SCR_HintManagerComponent.HideHint();
SCR_HintManagerComponent.ClearLatestHint();
GetGame().GetCallqueue().CallLater(PlaySoundSystem, 1000, false, "ObstacleStart", true);
}
};
```
--------------------------------
### Initialize UI for Server Download Action
Source: https://arexplorer.zeroy.com/_s_c_r___download_manager___addon_download_line_8c_source
Sets up UI for server-side download operations. Hides buttons, conceals addon size icon, stores action reference, and schedules periodic updates every 20ms.
```cpp
void InitForServerDownloadAction(SCR_WorkshopItemActionDownload action)
{
m_Action = action;
m_bHideButtons = true;
if (m_Widgets && m_Widgets.m_AddonSizeIcon)
m_Widgets.m_AddonSizeIcon.SetVisible(false);
Update();
GetGame().GetCallqueue().CallLater(Update, 20, true);
}
```
--------------------------------
### Get Occupants Damage Speed Threshold
Source: https://arexplorer.zeroy.com/_s_c_r___vehicle_damage_manager_component_8c
Returns the speed threshold at which occupant damage starts to be applied. This is a float value.
```csharp
float GetOccupantsDamageSpeedThreshold()
{
// Implementation details for getting occupant damage speed threshold
return 0.0f;
}
```
--------------------------------
### Implement SCR_CampaignTutorialArlandDriving8 Setup Method
Source: https://arexplorer.zeroy.com/_s_c_r___campaign_tutorial_arland_driving8_8c_source
Overrides the Setup method to initialize the driving tutorial stage by registering a waypoint, configuring completion parameters, managing UI hints, and playing audio. Sets up waypoint "WP_DRIVING_35" with a 10-unit completion radius and displays the serpentine tutorial image.
```c
override protected void Setup()
{
RegisterWaypoint("WP_DRIVING_35");
m_fWaypointCompletionRadius = 10;
m_fWaypointHeightOffset = 0;
SCR_HintManagerComponent.HideHint();
SCR_HintManagerComponent.ClearLatestHint();
PlaySoundSystem("Serpentine", true);
m_TutorialComponent.SetWaypointMiscImage("SERPENTINE", true);
}
```
--------------------------------
### Get OnStart Event Invoker
Source: https://arexplorer.zeroy.com/_s_c_r___info_display_8c
Returns the SCR_InfoDisplayInvoker for the OnStart event. Allows registration of callbacks to be executed when the display starts.
```c
SCR_InfoDisplayInvoker GetOnStart()
```
--------------------------------
### Engine: Start
Source: https://arexplorer.zeroy.com/group___vehicle
Initiates the engine's startup sequence. This function is used to start the engine.
```proto
proto external void EngineStart | ( | | ) |
Starts the engine.
```
--------------------------------
### SCR_TutorialNavigation2 Class Definition and Setup
Source: https://arexplorer.zeroy.com/_s_c_r___tutorial_navigation2_8c_source
Defines the SCR_TutorialNavigation2 class and its Setup method. This method is responsible for subscribing and unsubscribing to map open/close events from SCR_MapEntity and playing a navigation sound. It relies on a TutorialComponent and PlaySoundSystem.
```typescript
class SCR_TutorialNavigation2Class: SCR_BaseCampaignTutorialArlandStageClass
{
};
class SCR_TutorialNavigation2 : SCR_BaseCampaignTutorialArlandStage
{
override protected void Setup()
{
SCR_MapEntity.GetOnMapOpen().Remove(m_TutorialComponent.OnMapOpen);
SCR_MapEntity.GetOnMapClose().Remove(m_TutorialComponent.OnMapClose);
SCR_MapEntity.GetOnMapOpen().Insert(m_TutorialComponent.OnMapOpen);
SCR_MapEntity.GetOnMapClose().Insert(m_TutorialComponent.OnMapClose);
PlaySoundSystem("Navigation_OpenMap", true);
HintOnVoiceOver();
}
override protected bool GetIsFinished()
{
return m_TutorialComponent.GetIsMapOpen();
}
};
```
--------------------------------
### Get Communication Status Check Start Invoker
Source: https://arexplorer.zeroy.com/_s_c_r___services_status_helper_8c_source
Returns the ScriptInvokerVoid event dispatcher for status check initiation callbacks. Lazily instantiates invoker on first access. Used to register listeners for backend communication start events.
```C#
static ScriptInvokerVoid GetOnCommStatusCheckStart()
{
if (!s_OnCommStatusCheckStart)
s_OnCommStatusCheckStart = new ScriptInvokerVoid();
return s_OnCommStatusCheckStart;
}
```
--------------------------------
### Setup Tutorial Navigation with Widget Highlighting
Source: https://arexplorer.zeroy.com/_s_c_r___tutorial_navigation4_8c_source
Initializes the tutorial navigation stage by hiding hints, playing navigation sound effects, and creating a highlight widget around the tool menu. Uses SCR_WidgetHighlightUIComponent to visually emphasize the ToolMenu widget during tutorial execution.
```c
override protected void Setup()
{
SCR_HintManagerComponent.HideHint();
SCR_HintManagerComponent.ClearLatestHint();
PlaySoundSystem("Navigation_MapTools");
Widget toolMenu = GetGame().GetWorkspace().FindAnyWidget("ToolMenu");
if (toolMenu)
m_wHighlight = SCR_WidgetHighlightUIComponent.CreateHighlight(toolMenu, "{D574871D2C37B255}UI/layouts/Common/WidgetHighlight.layout");
}
```
--------------------------------
### SCR_HeliCourse_stage3 Class Definition and Setup
Source: https://arexplorer.zeroy.com/_s_c_r___heli_course__stage3_8c_source
Defines the SCR_HeliCourse_stage3 class, inheriting from SCR_BaseCampaignTutorialArlandStage. The Setup method initializes a helicopter entity, retrieves its controller component, and sets up an invoker for the engine start event. It also schedules a sound to play after a delay and triggers a voice-over.
```C++
class SCR_HeliCourse_stage3Class: SCR_BaseCampaignTutorialArlandStageClass
{
};
class SCR_HeliCourse_stage3 : SCR_BaseCampaignTutorialArlandStage
{
protected bool m_bEngineStarted;
protected ScriptInvokerVoid m_OnEngineStartedInvoker;
override protected void Setup()
{
Vehicle helicopter = Vehicle.Cast(GetGame().GetWorld().FindEntityByName("UH1COURSE"));
if (!helicopter)
return;
SCR_HelicopterControllerComponent comp = SCR_HelicopterControllerComponent.Cast(helicopter.FindComponent(SCR_HelicopterControllerComponent));
if (!comp)
return;
m_OnEngineStartedInvoker = comp.GetOnEngineStart();
if (m_OnEngineStartedInvoker)
comp.GetOnEngineStart().Insert(OnEngineStart);
GetGame().GetCallqueue().CallLater(PlaySoundSystem, 2000, false, "Heli_StartEngine", true);
HintOnVoiceOver();
}
```
--------------------------------
### Setup Download Confirmation Dialog - Arma 3
Source: https://arexplorer.zeroy.com/_s_c_r___download_confirmation_dialog_8c_source
Sets up the download confirmation dialog with addons and their versions, determining whether to subscribe to addons. It initializes dependencies and inserts the provided addon data.
```Arma 3
protected static void SetupDownloadDialogAddons(notnull out SCR_DownloadConfirmationDialog dialog, notnull array][> addonsAndVersions, bool subscribeToAddons)
{
dialog.m_bDownloadMainItem = false;
dialog.m_bSubscribeToAddons = subscribeToAddons;
dialog.m_aDependencies = new array][;
dialog.m_aDependencyVersions = new array][;
foreach (Tuple2 i : addonsAndVersions)
{
dialog.m_aDependencies.Insert(i.param1);
dialog.m_aDependencyVersions.Insert(i.param2);
}
}
```
--------------------------------
### Implement SCR_CampaignTutorialArlandDriving18 Stage Setup
Source: https://arexplorer.zeroy.com/_s_c_r___campaign_tutorial_arland_driving18_8c_source
This C++ code defines the setup and completion logic for the SCR_CampaignTutorialArlandDriving18 stage. It registers a waypoint, sets a completion radius and height offset, and determines stage completion based on the player being in a vehicle. Dependencies include SCR_BaseCampaignTutorialArlandStage.
```cpp
class SCR_CampaignTutorialArlandDriving18Class: SCR_BaseCampaignTutorialArlandStageClass
{
};
class SCR_CampaignTutorialArlandDriving18 : SCR_BaseCampaignTutorialArlandStage
{
override protected void Setup()
{
RegisterWaypoint("WP_DRIVING_45");
m_fWaypointCompletionRadius = 10;
m_fWaypointHeightOffset = 0;
}
override protected bool GetIsFinished()
{
return m_Player.IsInVehicle();
}
};
```
--------------------------------
### Implement Tutorial Stage Setup Method
Source: https://arexplorer.zeroy.com/_s_c_r___tutorial_conflict_capture21_8c_source
Overrides the Setup() method to initialize the tutorial stage by locating the main military base entity, registering it as a waypoint, retrieving its SCR_CampaignMilitaryBaseComponent, hiding previous hints, and triggering audio and voice-over notifications. Returns early if required entities or components are not found.
```C
override protected void Setup()
{
IEntity baseEnt = GetGame().GetWorld().FindEntityByName("MainBaseMossHill");
if (!baseEnt)
return;
RegisterWaypoint(baseEnt);
m_bCheckWaypoint = false;
m_Base = SCR_CampaignMilitaryBaseComponent.Cast(baseEnt.FindComponent(SCR_CampaignMilitaryBaseComponent));
if (!m_Base)
return;
SCR_HintManagerComponent.HideHint();
SCR_HintManagerComponent.ClearLatestHint();
PlaySoundSystem("Conflict_MoveToCapture");
HintOnVoiceOver();
}
```]