include "TriggerLibs/NativeLib"
include "TriggerLibs/HeroesLib"
include "TriggerLibs/GameLib"
include "TriggerLibs/MapMechanicsLib"
include "TriggerLibs/AILib"
include "TriggerLibs/UILib"
include "LibVLSK_h"
//--------------------------------------------------------------------------------------------------
// Library: Volskaya Mechanics
//--------------------------------------------------------------------------------------------------
// External Library Initialization
void libVLSK_InitLibraries () {
libNtve_InitVariables();
libCore_InitVariables();
libGame_InitVariables();
libMapM_InitVariables();
libAIAI_InitVariables();
libUIUI_InitVariables();
}
// Variable Initialization
bool libVLSK_InitVariables_completed = false;
void libVLSK_InitVariables () {
int init_i;
if (libVLSK_InitVariables_completed) {
return;
}
libVLSK_InitVariables_completed = true;
libVLSK_gv_capturePointContestTimeGoal_C = 3.0;
libVLSK_gv_capturePointVictoryTimeGoal_C = 45.0;
libVLSK_gv_capturePointDecayDelayTime_C = 5.0;
libVLSK_gv_capturePointContestFilter_C = UnitFilter((1 << c_targetFilterHeroic), 0, (1 << c_targetFilterAir) | (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32)) | (1 << (c_targetFilterBenign - 32)));
for (init_i = 0; init_i <= libVLSK_gv_capturePointMaxCount_C; init_i += 1) {
libVLSK_gv_capturePoints[init_i].lv_state = libVLSK_ge_OverwatchCapturePoint_State_Empty;
}
libVLSK_gv_capturePointCooldownTimer = TimerCreate();
libVLSK_gv_capturePointWarningTimer = TimerCreate();
libVLSK_gv_grantStandardCapturePointRewards = true;
libVLSK_gv_mMVolskayaObjectivePreviewTimer = TimerCreate();
libVLSK_gv_mMVolskayaObjectivePreviewDelay_C = 30.0;
libVLSK_gv_pilotNeededTimer = TimerCreate();
libVLSK_gv_gunnerNeededTimer = TimerCreate();
libVLSK_gv_controlPointVisualsActorMsgRadius_C = 15.0;
libVLSK_gv_capturePointPlayControllingSounds = true;
libVLSK_gv_overwatchAllyBlue_C = Color(11.37, 75.69, 89.41);
libVLSK_gv_overwatchEnemyRed_C = Color(96.08, 23.14, 23.53);
libVLSK_gv_overwatchNeutralYellow_C = Color(96.47, 89.41, 32.16);
libVLSK_gv_volskayaUI.lv_mapMechanic_Container = c_invalidDialogControlId;
libVLSK_gv_volskayaUI.lv_mapMechanic_ContestProgressBar = c_invalidDialogControlId;
libVLSK_gv_volskayaUI.lv_mapMechanic_ContestProgressBar_FillImage = c_invalidDialogControlId;
libVLSK_gv_volskayaUI.lv_mapMechanic_VictoryProgress_OrderFill = c_invalidDialogControlId;
libVLSK_gv_volskayaUI.lv_mapMechanic_VictoryProgress_OrderStroke = c_invalidDialogControlId;
libVLSK_gv_volskayaUI.lv_mapMechanic_VictoryProgress_OrderLabel = c_invalidDialogControlId;
libVLSK_gv_volskayaUI.lv_mapMechanic_VictoryProgress_ChaosFill = c_invalidDialogControlId;
libVLSK_gv_volskayaUI.lv_mapMechanic_VictoryProgress_ChaosStroke = c_invalidDialogControlId;
libVLSK_gv_volskayaUI.lv_mapMechanic_VictoryProgress_ChaosLabel = c_invalidDialogControlId;
libVLSK_gv_volskayaUI.lv_mapMechanic_CenterCircle = c_invalidDialogControlId;
libVLSK_gv_volskayaUI.lv_mapMechanic_CenterIndicator = c_invalidDialogControlId;
libVLSK_gv_volskayaUI.lv_mapMechanic_ContestedLabel = c_invalidDialogControlId;
libVLSK_gv_volskayaUI.lv_slideout_Container = c_invalidDialogControlId;
libVLSK_gv_volskayaUI.lv_slideout_ToastNotification = c_invalidDialogControlId;
libVLSK_gv_volskayaUI.lv_slideout_InfoLabel = c_invalidDialogControlId;
libVLSK_gv_volskayaUI.lv_slideout_TimerLabel = c_invalidDialogControlId;
libVLSK_gv_volskayaUI.lv_slideout_IconA = c_invalidDialogControlId;
libVLSK_gv_volskayaUI.lv_slideout_IconB = c_invalidDialogControlId;
libVLSK_gv_volskayaUI.lv_slideout_IconC = c_invalidDialogControlId;
libVLSK_gv_volskayaUI.lv_overtimeBar_Container = c_invalidDialogControlId;
libVLSK_gv_volskayaUI.lv_overtimeBar_ProgressBar = c_invalidDialogControlId;
libVLSK_gv_volskayaUI.lv_robot_Container = c_invalidDialogControlId;
libVLSK_gv_volskayaUI.lv_robot_TimeLabel = c_invalidDialogControlId;
libVLSK_gv_volskayaUI.lv_robot_StatusFrame = c_invalidDialogControlId;
libVLSK_gv_volskayaUI.lv_robot_GunnerPortrait = c_invalidDialogControlId;
libVLSK_gv_volskayaUI.lv_robot_PilotPortrait = c_invalidDialogControlId;
libVLSK_gv_volskayaUI.lv_robot_DeathIcon1 = c_invalidDialogControlId;
libVLSK_gv_volskayaUI.lv_robot_DeathIcon2 = c_invalidDialogControlId;
libVLSK_gv_volskayaUI.lv_robot_DeathIcon3 = c_invalidDialogControlId;
libVLSK_gv_volskayaUI.lv_robot_RobotIcon = c_invalidDialogControlId;
libVLSK_gv_useFirstEventVoiceover = true;
}
// Presets
// Functions
void libVLSK_gf_InitializeOverwatchCapturePoint (region lp_region, point lp_rewardPoint, unit lp_pilotBannerSconce, unit lp_gunnerBannerSconce, string lp_minimapIconUnitType, string lp_minimapIconPreviewUnitType, string lp_controlIndicatorImage) {
// Automatic Variable Declarations
// Implementation
libVLSK_gv_capturePointCount += 1;
libVLSK_gv_capturePoints[libVLSK_gv_capturePointCount].lv_region = lp_region;
libVLSK_gv_capturePoints[libVLSK_gv_capturePointCount].lv_robotSpawnPoint = lp_rewardPoint;
libVLSK_gv_capturePoints[libVLSK_gv_capturePointCount].lv_pilotBannerSconce = lp_pilotBannerSconce;
libVLSK_gv_capturePoints[libVLSK_gv_capturePointCount].lv_gunnerBannerSconce = lp_gunnerBannerSconce;
libVLSK_gv_capturePoints[libVLSK_gv_capturePointCount].lv_minimapIconUnitType = lp_minimapIconUnitType;
libVLSK_gv_capturePoints[libVLSK_gv_capturePointCount].lv_minimapIconPreviewUnitType = lp_minimapIconPreviewUnitType;
libVLSK_gv_capturePoints[libVLSK_gv_capturePointCount].lv_controlIndicatorImage = lp_controlIndicatorImage;
}
void libVLSK_gf_EnableDisableCapturePoint (int lp_capturePointIndex, bool lp_enableOrDisable) {
// Automatic Variable Declarations
// Implementation
if ((lp_enableOrDisable == true)) {
libVLSK_gv_capturePoints[lp_capturePointIndex].lv_owningTeam = 0;
libVLSK_gv_capturePoints[lp_capturePointIndex].lv_contestTimes[libGame_gv_teamOrderIndex_C] = 0.0;
libVLSK_gv_capturePoints[lp_capturePointIndex].lv_contestTimes[libGame_gv_teamChaosIndex_C] = 0.0;
libVLSK_gv_capturePoints[lp_capturePointIndex].lv_victoryTimes[libGame_gv_teamOrderIndex_C] = 0.0;
libVLSK_gv_capturePoints[lp_capturePointIndex].lv_victoryTimes[libGame_gv_teamChaosIndex_C] = 0.0;
libVLSK_gv_capturePoints[lp_capturePointIndex].lv_isActive = true;
libVLSK_gv_capturePoints[lp_capturePointIndex].lv_state = libVLSK_ge_OverwatchCapturePoint_State_Empty;
libVLSK_gf_UpdateUIContestBarProgress();
libVLSK_gf_UpdateUIVictoryPercentLabels();
libVLSK_gf_UpdateUIControlFrameColors(libCore_gv_cOMPUTER_Neutral);
libVLSK_gf_UpdateUIControlPointIndicatorImage();
DialogControlSetVisible(libVLSK_gv_volskayaUI.lv_mapMechanic_Container, PlayerGroupAll(), true);
libVLSK_gf_SendEventVolskayaPointEnabled(libVLSK_gv_capturePoints[lp_capturePointIndex].lv_region);
AddUnitOfInterest(libVLSK_gv_capturePoints[lp_capturePointIndex].lv_minimapIconUnit, 7.0, 0.0, "VolskayaPoint", libNtve_ge_GoalTeam_Both, 0);
libVLSK_gv_currentCapturePoint = lp_capturePointIndex;
libVLSK_gf_MonitorCapturePointProgressUntilComplete(lp_capturePointIndex);
StatEventCreate("VolskayaCapturePointSpawned");
StatEventAddDataFixed(StatEventLastCreated(), "GameTime", libUIUI_gf_HeroesGameTime());
StatEventSend(StatEventLastCreated());
}
else {
libVLSK_gv_capturePoints[lp_capturePointIndex].lv_state = libVLSK_ge_OverwatchCapturePoint_State_Empty;
libVLSK_gv_capturePoints[lp_capturePointIndex].lv_isActive = false;
libVLSK_gf_EnableDisableOvertimeBar(false);
UnitKill(libVLSK_gv_capturePoints[lp_capturePointIndex].lv_minimapIconUnit);
DialogControlSendAnimationEvent(libVLSK_gv_volskayaUI.lv_mapMechanic_Container, PlayerGroupAll(), "PlaySlideOut");
}
}
void libVLSK_gf_CreateCapturePointPreview (int lp_capturePointIndex) {
// Automatic Variable Declarations
// Implementation
libNtve_gf_CreateUnitsWithDefaultFacing(1, libVLSK_gv_capturePoints[lp_capturePointIndex].lv_minimapIconPreviewUnitType, c_unitCreateIgnorePlacement, libCore_gv_cOMPUTER_Neutral, RegionGetCenter(libVLSK_gv_capturePoints[lp_capturePointIndex].lv_region), null);
libVLSK_gv_capturePoints[lp_capturePointIndex].lv_minimapIconUnit = UnitLastCreated();
libNtve_gf_SendActorMessageToUnit(libVLSK_gv_capturePoints[lp_capturePointIndex].lv_minimapIconUnit, "MinimapIconTintColor 255,145,113,218");
libNtve_gf_SendActorMessageToUnit(libVLSK_gv_capturePoints[lp_capturePointIndex].lv_minimapIconUnit, "MinimapTooltip DOCSTR_NextControlPoint");
}
void libVLSK_gf_MonitorCapturePointProgressUntilComplete (int lp_capturePointIndex) {
int init_i;
// Variable Declarations
unitgroup[libCore_gv_bALMaxTeams + 1] lv_heroesOnPoint;
int[libCore_gv_bALMaxTeams + 1] lv_heroesCount;
unit lv_heroUnit;
int lv_team;
// Automatic Variable Declarations
unitgroup auto6A84EA13_g;
int auto6A84EA13_u;
unit auto6A84EA13_var;
unitgroup autoA8658254_g;
int autoA8658254_u;
unit autoA8658254_var;
const int auto11DFCA09_ae = libCore_gv_bALMaxTeams;
const int auto11DFCA09_ai = 1;
unitgroup autoC383448E_g;
int autoC383448E_u;
// Variable Initialization
for (init_i = 0; init_i <= libCore_gv_bALMaxTeams; init_i += 1) {
lv_heroesOnPoint[init_i] = UnitGroupEmpty();
}
// Implementation
while ((libVLSK_gv_capturePoints[lp_capturePointIndex].lv_isActive == true) && (libGame_gv_gameOver == false)) {
lv_heroesOnPoint[libGame_gv_teamOrderIndex_C] = UnitGroupAlliance(libCore_gv_cOMPUTER_TeamOrder, c_unitAllianceAlly, libVLSK_gv_capturePoints[lp_capturePointIndex].lv_region, libVLSK_gv_capturePointContestFilter_C, 0);
lv_heroesOnPoint[libGame_gv_teamChaosIndex_C] = UnitGroupAlliance(libCore_gv_cOMPUTER_TeamChaos, c_unitAllianceAlly, libVLSK_gv_capturePoints[lp_capturePointIndex].lv_region, libVLSK_gv_capturePointContestFilter_C, 0);
auto6A84EA13_g = lv_heroesOnPoint[libGame_gv_teamOrderIndex_C];
auto6A84EA13_u = UnitGroupCount(auto6A84EA13_g, c_unitCountAll);
for (;; auto6A84EA13_u -= 1) {
auto6A84EA13_var = UnitGroupUnitFromEnd(auto6A84EA13_g, auto6A84EA13_u);
if (auto6A84EA13_var == null) { break; }
if ((UnitFilterMatch(auto6A84EA13_var, 0, UnitFilter(0, (1 << (c_targetFilterHallucination - 32)), 0, 0)) == true) && (UnitHasBehavior2(auto6A84EA13_var, "CapturePointAllowed") == false)) {
UnitGroupRemove(lv_heroesOnPoint[libGame_gv_teamOrderIndex_C], auto6A84EA13_var);
}
}
autoA8658254_g = lv_heroesOnPoint[libGame_gv_teamChaosIndex_C];
autoA8658254_u = UnitGroupCount(autoA8658254_g, c_unitCountAll);
for (;; autoA8658254_u -= 1) {
autoA8658254_var = UnitGroupUnitFromEnd(autoA8658254_g, autoA8658254_u);
if (autoA8658254_var == null) { break; }
if ((UnitFilterMatch(autoA8658254_var, 0, UnitFilter(0, (1 << (c_targetFilterHallucination - 32)), 0, 0)) == true) && (UnitHasBehavior2(autoA8658254_var, "CapturePointAllowed") == false)) {
UnitGroupRemove(lv_heroesOnPoint[libGame_gv_teamChaosIndex_C], autoA8658254_var);
}
}
lv_heroesCount[libGame_gv_teamOrderIndex_C] = UnitGroupCount(lv_heroesOnPoint[libGame_gv_teamOrderIndex_C], c_unitCountAlive);
lv_heroesCount[libGame_gv_teamChaosIndex_C] = UnitGroupCount(lv_heroesOnPoint[libGame_gv_teamChaosIndex_C], c_unitCountAlive);
lv_team = 1;
for ( ; ( (auto11DFCA09_ai >= 0 && lv_team <= auto11DFCA09_ae) || (auto11DFCA09_ai < 0 && lv_team >= auto11DFCA09_ae) ) ; lv_team += auto11DFCA09_ai ) {
autoC383448E_g = lv_heroesOnPoint[lv_team];
autoC383448E_u = UnitGroupCount(autoC383448E_g, c_unitCountAll);
for (;; autoC383448E_u -= 1) {
lv_heroUnit = UnitGroupUnitFromEnd(autoC383448E_g, autoC383448E_u);
if (lv_heroUnit == null) { break; }
if (((UnitGetOwner(lv_heroUnit) >= 1) && (UnitGetOwner(lv_heroUnit) <= libCore_gv_bALMaxPlayers))) {
libGame_gf_SendMapSpecificAwardEvent(UnitGetOwner(lv_heroUnit), 0.0625, true);
libGame_gf_AfkResetWarningTimerForPlayer(UnitGetOwner(lv_heroUnit));
UnitBehaviorAdd(lv_heroUnit, "HeroGenericHeroOnCapturePoint", lv_heroUnit, 1);
}
}
}
if ((lv_heroesCount[libGame_gv_teamOrderIndex_C] == 0) && (lv_heroesCount[libGame_gv_teamChaosIndex_C] == 0)) {
libVLSK_gf_EnableDisableUIContestedCalloutDialog(false);
libVLSK_gf_DecayCapturePointContest(lp_capturePointIndex, libGame_gv_teamOrderIndex_C, 0.25);
libVLSK_gf_DecayCapturePointContest(lp_capturePointIndex, libGame_gv_teamChaosIndex_C, 0.25);
libVLSK_gf_UpdateUIContestBarProgress();
if ((libVLSK_gv_capturePoints[lp_capturePointIndex].lv_state != libVLSK_ge_OverwatchCapturePoint_State_Empty)) {
libVLSK_gv_capturePoints[lp_capturePointIndex].lv_state = libVLSK_ge_OverwatchCapturePoint_State_Empty;
if ((libVLSK_gv_capturePoints[lp_capturePointIndex].lv_wasProgressing[libGame_gv_teamOrderIndex_C] == true)) {
libVLSK_gf_SendEventVolskayaTeamStopsCapturingPoint(libGame_gv_teamOrderIndex_C, lp_capturePointIndex);
}
if ((libVLSK_gv_capturePoints[lp_capturePointIndex].lv_wasProgressing[libGame_gv_teamChaosIndex_C] == true)) {
libVLSK_gf_SendEventVolskayaTeamStopsCapturingPoint(libGame_gv_teamChaosIndex_C, lp_capturePointIndex);
}
}
libVLSK_gv_capturePoints[lp_capturePointIndex].lv_wasProgressing[libGame_gv_teamOrderIndex_C] = false;
libVLSK_gv_capturePoints[lp_capturePointIndex].lv_wasProgressing[libGame_gv_teamChaosIndex_C] = false;
}
else if ((lv_heroesCount[libGame_gv_teamOrderIndex_C] > 0) && (lv_heroesCount[libGame_gv_teamChaosIndex_C] == 0)) {
libVLSK_gf_EnableDisableUIContestedCalloutDialog(false);
libVLSK_gf_AdvanceCapturePointContestProgress(lp_capturePointIndex, libGame_gv_teamOrderIndex_C);
libVLSK_gf_UpdateUIContestBarProgress();
if ((libVLSK_gv_capturePoints[lp_capturePointIndex].lv_wasProgressing[libGame_gv_teamChaosIndex_C] == true)) {
libVLSK_gv_capturePoints[lp_capturePointIndex].lv_wasProgressing[libGame_gv_teamChaosIndex_C] = false;
libVLSK_gf_SendEventVolskayaTeamStopsCapturingPoint(libGame_gv_teamChaosIndex_C, lp_capturePointIndex);
}
libVLSK_gv_capturePoints[lp_capturePointIndex].lv_wasProgressing[libGame_gv_teamOrderIndex_C] = true;
if ((libVLSK_gv_capturePoints[lp_capturePointIndex].lv_state != libVLSK_ge_OverwatchCapturePoint_State_Capturing)) {
libVLSK_gv_capturePoints[lp_capturePointIndex].lv_state = libVLSK_ge_OverwatchCapturePoint_State_Capturing;
libVLSK_gf_SendEventVolskayaTeamBeginsCapturingPoint(libGame_gv_teamOrderIndex_C, libGame_gv_teamChaosIndex_C, lp_capturePointIndex);
}
}
else if ((lv_heroesCount[libGame_gv_teamOrderIndex_C] == 0) && (lv_heroesCount[libGame_gv_teamChaosIndex_C] > 0)) {
libVLSK_gf_EnableDisableUIContestedCalloutDialog(false);
libVLSK_gf_AdvanceCapturePointContestProgress(lp_capturePointIndex, libGame_gv_teamChaosIndex_C);
libVLSK_gf_UpdateUIContestBarProgress();
if ((libVLSK_gv_capturePoints[lp_capturePointIndex].lv_wasProgressing[libGame_gv_teamOrderIndex_C] == true)) {
libVLSK_gv_capturePoints[lp_capturePointIndex].lv_wasProgressing[libGame_gv_teamOrderIndex_C] = false;
libVLSK_gf_SendEventVolskayaTeamStopsCapturingPoint(libGame_gv_teamOrderIndex_C, lp_capturePointIndex);
}
libVLSK_gv_capturePoints[lp_capturePointIndex].lv_wasProgressing[libGame_gv_teamChaosIndex_C] = true;
if ((libVLSK_gv_capturePoints[lp_capturePointIndex].lv_state != libVLSK_ge_OverwatchCapturePoint_State_Capturing)) {
libVLSK_gv_capturePoints[lp_capturePointIndex].lv_state = libVLSK_ge_OverwatchCapturePoint_State_Capturing;
libVLSK_gf_SendEventVolskayaTeamBeginsCapturingPoint(libGame_gv_teamChaosIndex_C, libGame_gv_teamOrderIndex_C, lp_capturePointIndex);
}
}
else if ((lv_heroesCount[libGame_gv_teamOrderIndex_C] > 0) && (lv_heroesCount[libGame_gv_teamChaosIndex_C] > 0)) {
libVLSK_gf_EnableDisableUIContestedCalloutDialog(true);
if ((libVLSK_gv_capturePoints[lp_capturePointIndex].lv_state != libVLSK_ge_OverwatchCapturePoint_State_Contested)) {
libVLSK_gv_capturePoints[lp_capturePointIndex].lv_state = libVLSK_ge_OverwatchCapturePoint_State_Contested;
if ((libVLSK_gv_capturePoints[lp_capturePointIndex].lv_contestTimes[libGame_gv_teamOrderIndex_C] >= libVLSK_gv_capturePoints[lp_capturePointIndex].lv_contestTimes[libGame_gv_teamChaosIndex_C])) {
libVLSK_gf_SendEventVolskayaTeamBeginsContestingPoint(libGame_gv_teamOrderIndex_C, libGame_gv_teamChaosIndex_C, lp_capturePointIndex);
}
else {
libVLSK_gf_SendEventVolskayaTeamBeginsContestingPoint(libGame_gv_teamChaosIndex_C, libGame_gv_teamOrderIndex_C, lp_capturePointIndex);
}
}
}
if ((libVLSK_gv_capturePoints[lp_capturePointIndex].lv_owningTeam != libCore_gv_cOMPUTER_Neutral)) {
libVLSK_gf_AdvanceCapturePointVictoryProgress(lp_capturePointIndex);
if ((libVLSK_gv_capturePointPlayControllingSounds == true)) {
libVLSK_gf_PlayControllingSoundsForTeams(libVLSK_gv_capturePoints[lp_capturePointIndex].lv_owningTeam);
}
}
else {
libVLSK_gf_PauseUnpauseControllingSoundsForTeam(true, libGame_gv_teamOrderIndex_C);
libVLSK_gf_PauseUnpauseControllingSoundsForTeam(true, libGame_gv_teamChaosIndex_C);
}
libVLSK_gf_UpdateUIVictoryPercentLabels();
Wait(libVLSK_gv_capturePointCheckPeriod_C, c_timeGame);
}
}
void libVLSK_gf_AdvanceCapturePointContestProgress (int lp_capturePointIndex, int lp_contestingTeam) {
// Variable Declarations
int lv_enemyTeam;
fixed lv_newProgress;
// Automatic Variable Declarations
// Variable Initialization
lv_enemyTeam = libGame_gf_EnemyTeam(lp_contestingTeam);
lv_newProgress = (libVLSK_gv_capturePoints[lp_capturePointIndex].lv_contestTimes[lp_contestingTeam] + libVLSK_gv_capturePointCheckPeriod_C);
// Implementation
if ((libVLSK_gv_capturePoints[lp_capturePointIndex].lv_contestTimes[lp_contestingTeam] == 0.0) && (libVLSK_gv_capturePoints[lp_capturePointIndex].lv_contestTimes[lv_enemyTeam] == 0.0)) {
SoundPlayForPlayer(SoundLink("UI_Game_Volskaya_CapturePoint_Capturing_StartBeep", -1), c_maxPlayers, PlayerGroupAll(), 100.0, 0.0);
}
if ((libVLSK_gv_capturePoints[lp_capturePointIndex].lv_contestTimes[lv_enemyTeam] > 0.0)) {
libVLSK_gf_DecayCapturePointContest(lp_capturePointIndex, lv_enemyTeam, 2.0);
}
else {
libVLSK_gv_capturePoints[lp_capturePointIndex].lv_contestTimes[lp_contestingTeam] = libNtve_gf_ArithmeticRealClamp(lv_newProgress, 0.0, libVLSK_gv_capturePointContestTimeGoal_C);
}
if ((libVLSK_gv_capturePoints[lp_capturePointIndex].lv_contestTimes[lp_contestingTeam] == libVLSK_gv_capturePointContestTimeGoal_C) && (libVLSK_gv_capturePoints[lp_capturePointIndex].lv_owningTeam != lp_contestingTeam)) {
libVLSK_gf_ChangeOwnershipofCapturePoint(lp_capturePointIndex, lp_contestingTeam);
}
}
void libVLSK_gf_AdvanceCapturePointVictoryProgress (int lp_capturePointIndex) {
// Variable Declarations
int lv_owningTeam;
unitgroup lv_enemyHeroesOnPoint;
// Automatic Variable Declarations
// Variable Initialization
lv_owningTeam = libVLSK_gv_capturePoints[lp_capturePointIndex].lv_owningTeam;
lv_enemyHeroesOnPoint = UnitGroupAlliance(libGame_gf_ComputerPlayerInTeam(libVLSK_gv_capturePoints[lp_capturePointIndex].lv_owningTeam), c_unitAllianceEnemy, libVLSK_gv_capturePoints[lp_capturePointIndex].lv_region, libVLSK_gv_capturePointContestFilter_C, 0);
// Implementation
libVLSK_gv_capturePoints[lp_capturePointIndex].lv_victoryTimes[lv_owningTeam] += libVLSK_gv_capturePointCheckPeriod_C;
if ((libVLSK_gv_capturePoints[lp_capturePointIndex].lv_victoryTimes[lv_owningTeam] >= libVLSK_gv_capturePointVictoryTimeGoal_C)) {
if ((UnitGroupCount(lv_enemyHeroesOnPoint, c_unitCountAlive) > 0)) {
libVLSK_gv_capturePoints[lp_capturePointIndex].lv_isOvertimeActive = true;
libVLSK_gf_ClampVictoryProgressto99(lp_capturePointIndex);
libVLSK_gf_EnableDisableOvertimeBar(true);
libVLSK_gf_AdvanceOvertimeTimer(lp_capturePointIndex, true);
}
else {
if ((libVLSK_gv_capturePoints[lp_capturePointIndex].lv_isOvertimeActive == true) && (libVLSK_gv_capturePoints[lp_capturePointIndex].lv_overtimeRemaining > 0.0)) {
libVLSK_gf_ClampVictoryProgressto99(lp_capturePointIndex);
libVLSK_gf_AdvanceOvertimeTimer(lp_capturePointIndex, false);
}
else {
libVLSK_gf_AwardCapturePointVictorytoTeam(lp_capturePointIndex, libVLSK_gv_capturePoints[lp_capturePointIndex].lv_owningTeam);
}
}
}
else {
libVLSK_gf_ClampVictoryProgressto99(lp_capturePointIndex);
}
}
void libVLSK_gf_AdvanceOvertimeTimer (int lp_capturePointIndex, bool lp_resetBarFirst) {
// Automatic Variable Declarations
// Implementation
if ((lp_resetBarFirst == true)) {
libVLSK_gv_capturePoints[lp_capturePointIndex].lv_overtimeRemaining = libVLSK_gv_capturePointOvertimeTime_C;
}
libVLSK_gv_capturePoints[lp_capturePointIndex].lv_overtimeRemaining -= libVLSK_gv_capturePointCheckPeriod_C;
libVLSK_gf_UpdateOvertimeBarforPoint(lp_capturePointIndex);
}
void libVLSK_gf_AwardCapturePointVictorytoTeam (int lp_capturePointIndex, int lp_victoryTeam) {
// Automatic Variable Declarations
// Implementation
libVLSK_gf_SendEventVolskayaPointCompleted(libVLSK_gv_capturePoints[lp_capturePointIndex].lv_region, lp_victoryTeam);
libVLSK_gf_PlayVOControlPointCompleted(lp_victoryTeam);
libVLSK_gf_EnableDisableCapturePoint(lp_capturePointIndex, false);
StatEventCreate("VolskayaCapturePointComplete");
StatEventAddDataInt(StatEventLastCreated(), "WinningTeam", lp_victoryTeam);
StatEventAddDataFixed(StatEventLastCreated(), "LosingTeamProgress", libVLSK_gf_GetCapturePointVictoryProgressasInt(lp_capturePointIndex, libGame_gf_EnemyTeam(lp_victoryTeam)));
StatEventAddDataFixed(StatEventLastCreated(), "GameTime", libUIUI_gf_HeroesGameTime());
StatEventSend(StatEventLastCreated());
if ((libVLSK_gv_grantStandardCapturePointRewards == true)) {
libVLSK_gf_AwardGiantRobottoTeam(lp_victoryTeam, libVLSK_gv_capturePoints[lp_capturePointIndex].lv_robotSpawnPoint);
}
}
void libVLSK_gf_DecayCapturePointContest (int lp_capturePointIndex, int lp_team, fixed lp_speedMultiplier) {
// Variable Declarations
fixed lv_newProgressValue;
// Automatic Variable Declarations
// Variable Initialization
lv_newProgressValue = (libVLSK_gv_capturePoints[lp_capturePointIndex].lv_contestTimes[lp_team] - (libVLSK_gv_capturePointCheckPeriod_C * lp_speedMultiplier));
// Implementation
libVLSK_gv_capturePoints[lp_capturePointIndex].lv_contestTimes[lp_team] = libNtve_gf_ArithmeticRealClamp(lv_newProgressValue, 0.0, libVLSK_gv_capturePointContestTimeGoal_C);
if ((libVLSK_gv_capturePoints[lp_capturePointIndex].lv_contestTimes[lp_team] == 0.0)) {
if ((libVLSK_gv_capturePoints[lp_capturePointIndex].lv_wasDecaying[lp_team] == true)) {
libVLSK_gv_capturePoints[lp_capturePointIndex].lv_wasDecaying[lp_team] = false;
SoundPlayForPlayer(SoundLink("UI_Game_Volskaya_CapturePoint_Capturing_EndBeep", -1), c_maxPlayers, PlayerGroupAll(), 100.0, 0.0);
if ((libVLSK_gv_capturePoints[lp_capturePointIndex].lv_owningTeam != libCore_gv_cOMPUTER_Neutral)) {
libVLSK_gf_ChangeOwnershipofCapturePoint(lp_capturePointIndex, libCore_gv_cOMPUTER_Neutral);
}
}
}
else {
libVLSK_gv_capturePoints[lp_capturePointIndex].lv_wasDecaying[lp_team] = true;
}
}
void libVLSK_gf_ChangeOwnershipofCapturePoint (int lp_capturePointIndex, int lp_newOwningTeam) {
// Automatic Variable Declarations
// Implementation
UnitSetOwner(libVLSK_gv_capturePoints[lp_capturePointIndex].lv_minimapIconUnit, libGame_gf_ComputerPlayerInTeam(lp_newOwningTeam), true);
libVLSK_gf_UpdateUIControlFrameColors(lp_newOwningTeam);
libVLSK_gv_capturePoints[lp_capturePointIndex].lv_owningTeam = lp_newOwningTeam;
libVLSK_gv_capturePoints[lp_capturePointIndex].lv_contestTimes[lp_newOwningTeam] = libVLSK_gv_capturePointContestTimeGoal_C;
if ((libVLSK_gf_GetCapturePointVictoryProgressasInt(lp_capturePointIndex, lp_newOwningTeam) < 99)) {
libVLSK_gv_capturePoints[lp_capturePointIndex].lv_isOvertimeActive = false;
}
if ((lp_newOwningTeam == libCore_gv_cOMPUTER_Neutral)) {
libVLSK_gf_EnableDisableOvertimeBar(false);
}
libVLSK_gf_SendEventVolskayaPointOwnershipChanged(libVLSK_gv_capturePoints[lp_capturePointIndex].lv_region, lp_newOwningTeam);
}
void libVLSK_gf_ClampVictoryProgressto99 (int lp_capturePointIndex) {
// Variable Declarations
int lv_team;
// Automatic Variable Declarations
const int auto8A7EDE45_ae = libCore_gv_bALMaxTeams;
const int auto8A7EDE45_ai = 1;
// Variable Initialization
// Implementation
lv_team = 1;
for ( ; ( (auto8A7EDE45_ai >= 0 && lv_team <= auto8A7EDE45_ae) || (auto8A7EDE45_ai < 0 && lv_team >= auto8A7EDE45_ae) ) ; lv_team += auto8A7EDE45_ai ) {
libVLSK_gv_capturePoints[lp_capturePointIndex].lv_victoryTimes[lv_team] = libNtve_gf_ArithmeticRealClamp(libVLSK_gv_capturePoints[lp_capturePointIndex].lv_victoryTimes[lv_team], 0.0, (libVLSK_gv_capturePointVictoryTimeGoal_C * 0.999));
}
}
int libVLSK_gf_GetCapturePointVictoryProgressasInt (int lp_capturePointIndex, int lp_teamNumber) {
// Automatic Variable Declarations
// Implementation
return FixedToInt(((libVLSK_gv_capturePoints[lp_capturePointIndex].lv_victoryTimes[lp_teamNumber] / libVLSK_gv_capturePointVictoryTimeGoal_C) * 100.0));
}
int libVLSK_gf_GetNextCapturePointIndex () {
// Variable Declarations
int lv_nextPoint;
// Automatic Variable Declarations
// Variable Initialization
lv_nextPoint = (libVLSK_gv_currentCapturePoint + 1);
// Implementation
if ((lv_nextPoint > libVLSK_gv_capturePointCount)) {
lv_nextPoint = 1;
}
return lv_nextPoint;
}
int libVLSK_gf_OwningTeamOfCapturePoint (int lp_index) {
// Automatic Variable Declarations
// Implementation
return libVLSK_gv_capturePoints[lp_index].lv_owningTeam;
}
int libVLSK_gf_TeamCapturingNeutralPoint (int lp_index) {
// Automatic Variable Declarations
// Implementation
if ((libVLSK_gv_capturePoints[lp_index].lv_contestTimes[libGame_gv_teamOrderIndex_C] >= libVLSK_gv_capturePoints[lp_index].lv_contestTimes[libGame_gv_teamChaosIndex_C])) {
return libGame_gv_teamOrderIndex_C;
}
else {
return libGame_gv_teamChaosIndex_C;
}
}
fixed libVLSK_gf_CapturingProgressOfTeam (int lp_team, int lp_index) {
// Automatic Variable Declarations
// Implementation
return libVLSK_gv_capturePoints[lp_index].lv_contestTimes[lp_team];
}
int libVLSK_gf_StateOfPoint (int lp_index) {
// Automatic Variable Declarations
// Implementation
return libVLSK_gv_capturePoints[lp_index].lv_state;
}
trigger auto_libVLSK_gf_AwardGiantRobottoTeam_Trigger = null;
int auto_libVLSK_gf_AwardGiantRobottoTeam_lp_robotOwningTeam;
point auto_libVLSK_gf_AwardGiantRobottoTeam_lp_spawnPoint;
void libVLSK_gf_AwardGiantRobottoTeam (int lp_robotOwningTeam, point lp_spawnPoint) {
auto_libVLSK_gf_AwardGiantRobottoTeam_lp_robotOwningTeam = lp_robotOwningTeam;
auto_libVLSK_gf_AwardGiantRobottoTeam_lp_spawnPoint = lp_spawnPoint;
if (auto_libVLSK_gf_AwardGiantRobottoTeam_Trigger == null) {
auto_libVLSK_gf_AwardGiantRobottoTeam_Trigger = TriggerCreate("auto_libVLSK_gf_AwardGiantRobottoTeam_TriggerFunc");
}
TriggerExecute(auto_libVLSK_gf_AwardGiantRobottoTeam_Trigger, false, false);
}
bool auto_libVLSK_gf_AwardGiantRobottoTeam_TriggerFunc (bool testConds, bool runActions) {
int lp_robotOwningTeam = auto_libVLSK_gf_AwardGiantRobottoTeam_lp_robotOwningTeam;
point lp_spawnPoint = auto_libVLSK_gf_AwardGiantRobottoTeam_lp_spawnPoint;
// Variable Declarations
int lv_ping;
// Automatic Variable Declarations
// Variable Initialization
lv_ping = c_invalidPingId;
// Implementation
libVLSK_gf_SendEventVolskayaGiantRobotSpawns();
libNtve_gf_CreateUnitsWithDefaultFacing(1, "VolskayaVehicle", 0, libGame_gf_ComputerPlayerInTeam(lp_robotOwningTeam), lp_spawnPoint, null);
libVLSK_gv_giantRobotUnit = UnitLastCreated();
TriggerAddEventUnitDied(libVLSK_gt_GiantRobotDies, UnitRefFromVariable("libVLSK_gv_giantRobotUnit"));
TriggerEnable(libVLSK_gt_PilotEntersRobotDropBanner, true);
TriggerEnable(libVLSK_gt_GunnerEntersRobotDropBanner, true);
TimerStart(libVLSK_gv_pilotNeededTimer, 20.0, false, c_timeGame);
TriggerEnable(libVLSK_gt_PilotNeededTimerExpires, true);
TriggerEnable(libVLSK_gt_GunnerNeededTimerExpires, true);
TriggerEnable(libVLSK_gt_PilotEntersRobotStartGunnerReminderTimer, true);
TriggerEnable(libVLSK_gt_GunnerEntersRobotStopGunnerReminderTimer, true);
libMapM_gf_JungleStartHibernateCamps();
libVLSK_gf_SetGunnerPortrait(null);
libVLSK_gf_SetPilotPortrait(null);
libVLSK_gf_ShowRobotSlideoutStatusFrameforUnit(libVLSK_gv_giantRobotUnit);
PingCreateFromData(PlayerGroupAll(), "StormAlert", lp_spawnPoint);
lv_ping = PingLastCreated();
PingSetDuration(lv_ping, 3.0);
PingSetUnit(lv_ping, libVLSK_gv_giantRobotUnit);
return true;
}
void libVLSK_gf_SendEventVolskayaPointWarningCreated (region lp_position) {
// Automatic Variable Declarations
// Implementation
DataTableSetRegion(false, TriggerEventParamName(libVLSK_gv_eventID_VolskayaPointWarningCreated_C, libVLSK_gv_eventParam_VolskayaPointWarningCreated_Region_C), lp_position);
TriggerSendEvent(libVLSK_gv_eventID_VolskayaPointWarningCreated_C);
}
void libVLSK_gf_VolskayaPointWarningCreated (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libVLSK_gv_eventID_VolskayaPointWarningCreated_C);
}
region libVLSK_gf_VolskayaPointWarningCreatedRegion () {
// Automatic Variable Declarations
// Implementation
return DataTableGetRegion(false, TriggerEventParamName(libVLSK_gv_eventID_VolskayaPointWarningCreated_C, libVLSK_gv_eventParam_VolskayaPointWarningCreated_Region_C));
}
void libVLSK_gf_SendEventVolskayaPointEnabled (region lp_position) {
// Automatic Variable Declarations
// Implementation
DataTableSetRegion(false, TriggerEventParamName(libVLSK_gv_eventID_VolskayaPointEnabled_C, libVLSK_gv_eventParam_VolskayaPointEnabled_Region), lp_position);
TriggerSendEvent(libVLSK_gv_eventID_VolskayaPointEnabled_C);
}
void libVLSK_gf_VolskayaPointEnabled (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libVLSK_gv_eventID_VolskayaPointEnabled_C);
}
region libVLSK_gf_VolskayaPointEnabledRegion () {
// Automatic Variable Declarations
// Implementation
return DataTableGetRegion(false, TriggerEventParamName(libVLSK_gv_eventID_VolskayaPointEnabled_C, libVLSK_gv_eventParam_VolskayaPointEnabled_Region));
}
void libVLSK_gf_SendEventVolskayaPointCompleted (region lp_position, int lp_winningTeam) {
// Automatic Variable Declarations
// Implementation
DataTableSetRegion(false, TriggerEventParamName(libVLSK_gv_eventID_VolskayaPointCompleted, libVLSK_gv_eventParam_VolskayaPointCompleted_Region), lp_position);
DataTableSetInt(false, TriggerEventParamName(libVLSK_gv_eventID_VolskayaPointCompleted, libVLSK_gv_eventParam_VolskayaPointCompleted_WinningTeam), lp_winningTeam);
TriggerSendEvent(libVLSK_gv_eventID_VolskayaPointCompleted);
}
void libVLSK_gf_VolskayaPointCompleted (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libVLSK_gv_eventID_VolskayaPointCompleted);
}
region libVLSK_gf_VolskayaPointCompletedRegion () {
// Automatic Variable Declarations
// Implementation
return DataTableGetRegion(false, TriggerEventParamName(libVLSK_gv_eventID_VolskayaPointCompleted, libVLSK_gv_eventParam_VolskayaPointCompleted_Region));
}
int libVLSK_gf_VolskayaPointCompletedWinningTeam () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libVLSK_gv_eventID_VolskayaPointCompleted, libVLSK_gv_eventParam_VolskayaPointCompleted_WinningTeam));
}
void libVLSK_gf_SendEventVolskayaPointOwnershipChanged (region lp_position, int lp_newOwner) {
// Automatic Variable Declarations
// Implementation
DataTableSetRegion(false, TriggerEventParamName(libVLSK_gv_eventID_VolskayaPointOwnershipChanged_C, libVLSK_gv_eventParam_VolskayaPointOwnershipChanged_Region_C), lp_position);
DataTableSetInt(false, TriggerEventParamName(libVLSK_gv_eventID_VolskayaPointOwnershipChanged_C, libVLSK_gv_eventParam_VolskayaPointOwnershipChanged_NewOwner_C), lp_newOwner);
TriggerSendEvent(libVLSK_gv_eventID_VolskayaPointOwnershipChanged_C);
}
void libVLSK_gf_VolskayaPointOwnershipChanged (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libVLSK_gv_eventID_VolskayaPointOwnershipChanged_C);
}
region libVLSK_gf_VolskayaPointOwnershipChangedRegion () {
// Automatic Variable Declarations
// Implementation
return DataTableGetRegion(false, TriggerEventParamName(libVLSK_gv_eventID_VolskayaPointOwnershipChanged_C, libVLSK_gv_eventParam_VolskayaPointOwnershipChanged_Region_C));
}
int libVLSK_gf_VolskayaPointOwnershipChangedNewOwner () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libVLSK_gv_eventID_VolskayaPointOwnershipChanged_C, libVLSK_gv_eventParam_VolskayaPointOwnershipChanged_NewOwner_C));
}
void libVLSK_gf_SendEventVolskayaTeamBeginsCapturingPoint (int lp_allyTeam, int lp_enemyTeam, int lp_capturePointIndex) {
// Automatic Variable Declarations
// Implementation
DataTableSetInt(false, TriggerEventParamName(libVLSK_gv_eventID_Volskaya_TeamBeginsCapturingPoint, libVLSK_gv_eventParam_Volskaya_TeamBeginsCapturing_AllyTeam), lp_allyTeam);
DataTableSetInt(false, TriggerEventParamName(libVLSK_gv_eventID_Volskaya_TeamBeginsCapturingPoint, libVLSK_gv_eventParam_Volskaya_TeamBeginsCapturing_EnemyTeam), lp_enemyTeam);
DataTableSetInt(false, TriggerEventParamName(libVLSK_gv_eventID_Volskaya_TeamBeginsCapturingPoint, libVLSK_gv_eventParam_Volskaya_TeamBeginsCapturing_CapturePointIndex), lp_capturePointIndex);
TriggerSendEvent(libVLSK_gv_eventID_Volskaya_TeamBeginsCapturingPoint);
}
void libVLSK_gf_Volskaya_TeamBeginsCapturingPoint (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libVLSK_gv_eventID_Volskaya_TeamBeginsCapturingPoint);
}
int libVLSK_gf_Volskaya_TeamBeginsCapturingPoint_AllyTeam () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libVLSK_gv_eventID_Volskaya_TeamBeginsCapturingPoint, libVLSK_gv_eventParam_Volskaya_TeamBeginsCapturing_AllyTeam));
}
int libVLSK_gf_Volskaya_TeamBeginsCapturingPoint_EnemyTeam () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libVLSK_gv_eventID_Volskaya_TeamBeginsCapturingPoint, libVLSK_gv_eventParam_Volskaya_TeamBeginsCapturing_EnemyTeam));
}
int libVLSK_gf_Volskaya_TeamBeginsCapturingPoint_CapturePointIndex () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libVLSK_gv_eventID_Volskaya_TeamBeginsCapturingPoint, libVLSK_gv_eventParam_Volskaya_TeamBeginsCapturing_CapturePointIndex));
}
void libVLSK_gf_SendEventVolskayaTeamBeginsContestingPoint (int lp_originalTeam, int lp_contestingTeam, int lp_capturePointIndex) {
// Automatic Variable Declarations
// Implementation
DataTableSetInt(false, TriggerEventParamName(libVLSK_gv_eventID_Volskaya_TeamBeginsContestingPoint, libVLSK_gv_eventParam_Volskaya_TeamBeginsContesting_OriginalTeam), lp_originalTeam);
DataTableSetInt(false, TriggerEventParamName(libVLSK_gv_eventID_Volskaya_TeamBeginsContestingPoint, libVLSK_gv_eventParam_Volskaya_TeamBeginsContesting_ContestingTeam), lp_contestingTeam);
DataTableSetInt(false, TriggerEventParamName(libVLSK_gv_eventID_Volskaya_TeamBeginsContestingPoint, libVLSK_gv_eventParam_Volskaya_TeamBeginsContesting_CapturePointIndex), lp_capturePointIndex);
TriggerSendEvent(libVLSK_gv_eventID_Volskaya_TeamBeginsContestingPoint);
}
void libVLSK_gf_Volskaya_TeamBeginsContestingPoint (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libVLSK_gv_eventID_Volskaya_TeamBeginsContestingPoint);
}
int libVLSK_gf_Volskaya_TeamBeginsContestingPoint_OriginalTeam () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libVLSK_gv_eventID_Volskaya_TeamBeginsContestingPoint, libVLSK_gv_eventParam_Volskaya_TeamBeginsContesting_OriginalTeam));
}
int libVLSK_gf_Volskaya_TeamBeginsContestingPoint_ContestingTeam () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libVLSK_gv_eventID_Volskaya_TeamBeginsContestingPoint, libVLSK_gv_eventParam_Volskaya_TeamBeginsContesting_ContestingTeam));
}
int libVLSK_gf_Volskaya_TeamBeginsContestingPoint_CapturePointIndex () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libVLSK_gv_eventID_Volskaya_TeamBeginsContestingPoint, libVLSK_gv_eventParam_Volskaya_TeamBeginsContesting_CapturePointIndex));
}
void libVLSK_gf_SendEventVolskayaTeamStopsCapturingPoint (int lp_team, int lp_capturePointIndex) {
// Automatic Variable Declarations
// Implementation
DataTableSetInt(false, TriggerEventParamName(libVLSK_gv_eventID_Volskaya_TeamStopsCapturingPoint, libVLSK_gv_eventParam_Volskaya_TeamStopsCapturingPoint_Team), lp_team);
DataTableSetInt(false, TriggerEventParamName(libVLSK_gv_eventID_Volskaya_TeamStopsCapturingPoint, libVLSK_gv_eventParam_Volskaya_TeamStopsCapturingPoint_CapturePointIndex), lp_capturePointIndex);
TriggerSendEvent(libVLSK_gv_eventID_Volskaya_TeamStopsCapturingPoint);
}
void libVLSK_gf_Volskaya_TeamStopsCapturingPoint (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libVLSK_gv_eventID_Volskaya_TeamStopsCapturingPoint);
}
int libVLSK_gf_Volskaya_TeamStopsCapturingPoint_Team () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libVLSK_gv_eventID_Volskaya_TeamStopsCapturingPoint, libVLSK_gv_eventParam_Volskaya_TeamStopsCapturingPoint_Team));
}
int libVLSK_gf_Volskaya_TeamStopsCapturingPoint_CapturePointIndex () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libVLSK_gv_eventID_Volskaya_TeamStopsCapturingPoint, libVLSK_gv_eventParam_Volskaya_TeamStopsCapturingPoint_CapturePointIndex));
}
void libVLSK_gf_SendEventVolskayaGiantRobotSpawns () {
// Automatic Variable Declarations
// Implementation
TriggerSendEvent(libVLSK_gv_eventID_VolskayaGiantRobotSpawns);
}
void libVLSK_gf_VolskayaGiantRobotSpawns (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libVLSK_gv_eventID_VolskayaGiantRobotSpawns);
}
void libVLSK_gf_SendEventVolskayaGiantRobotDies (point lp_position, int lp_owningTeam) {
// Automatic Variable Declarations
// Implementation
DataTableSetPoint(false, TriggerEventParamName(libVLSK_gv_eventID_VolskayaGiantRobotDies, libVLSK_gv_eventParam_VolskayaGiantRobotDies_Position), lp_position);
DataTableSetInt(false, TriggerEventParamName(libVLSK_gv_eventID_VolskayaGiantRobotDies, libVLSK_gv_eventParam_VolskayaGiantRobotDies_OwningTeam), lp_owningTeam);
TriggerSendEvent(libVLSK_gv_eventID_VolskayaGiantRobotDies);
}
void libVLSK_gf_VolskayaGiantRobotDies (trigger t) {
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, libVLSK_gv_eventID_VolskayaGiantRobotDies);
}
point libVLSK_gf_VolskayaGiantRobotDiesPoint () {
// Automatic Variable Declarations
// Implementation
return DataTableGetPoint(false, TriggerEventParamName(libVLSK_gv_eventID_VolskayaGiantRobotDies, libVLSK_gv_eventParam_VolskayaGiantRobotDies_Position));
}
int libVLSK_gf_VolskayaGiantRobotDiesOwningTeam () {
// Automatic Variable Declarations
// Implementation
return DataTableGetInt(false, TriggerEventParamName(libVLSK_gv_eventID_VolskayaGiantRobotDies, libVLSK_gv_eventParam_VolskayaGiantRobotDies_OwningTeam));
}
void libVLSK_gf_PlayControllingSoundsForTeams (int lp_owningTeam) {
// Variable Declarations
int lv_enemyTeam;
int lv_percentage;
// Automatic Variable Declarations
int auto24C3265E_val;
// Variable Initialization
lv_enemyTeam = libGame_gf_EnemyTeam(lp_owningTeam);
lv_percentage = libVLSK_gf_GetCapturePointVictoryProgressasInt(libVLSK_gv_currentCapturePoint, lp_owningTeam);
// Implementation
libVLSK_gf_PauseUnpauseControllingSoundsForTeam(false, lp_owningTeam);
if ((lv_percentage == 0)) {
if ((libVLSK_gv_capturePoint_ControllingSound_Enemy[lp_owningTeam] == null)) {
SoundPlayForPlayer(SoundLink("UI_Game_Volskaya_CapturePoint_Controlling_Enemy00", -1), c_maxPlayers, libGame_gf_PlayersOnTeamHeroes(lv_enemyTeam, false), 100.0, 0.0);
libVLSK_gv_capturePoint_ControllingSound_Enemy[lp_owningTeam] = SoundLastPlayed();
}
}
if ((lv_percentage > libVLSK_gv_capturePoints[libVLSK_gv_currentCapturePoint].lv_oldCaptureProgress[lp_owningTeam])) {
libVLSK_gv_capturePoints[libVLSK_gv_currentCapturePoint].lv_oldCaptureProgress[lp_owningTeam] = lv_percentage;
auto24C3265E_val = lv_percentage;
if (auto24C3265E_val == 10) {
SoundPlayForPlayer(SoundLink("UI_Game_Volskaya_CapturePoint_Controlling_Enemy01", -1), c_maxPlayers, libGame_gf_PlayersOnTeamHeroes(lv_enemyTeam, false), 100.0, 0.0);
libVLSK_gv_capturePoint_ControllingSound_Enemy[lp_owningTeam] = SoundLastPlayed();
}
else if (auto24C3265E_val == 20) {
SoundPlayForPlayer(SoundLink("UI_Game_Volskaya_CapturePoint_Controlling_Enemy02", -1), c_maxPlayers, libGame_gf_PlayersOnTeamHeroes(lv_enemyTeam, false), 100.0, 0.0);
libVLSK_gv_capturePoint_ControllingSound_Enemy[lp_owningTeam] = SoundLastPlayed();
}
else if (auto24C3265E_val == 30) {
SoundPlayForPlayer(SoundLink("UI_Game_Volskaya_CapturePoint_Controlling_Enemy03", -1), c_maxPlayers, libGame_gf_PlayersOnTeamHeroes(lv_enemyTeam, false), 100.0, 0.0);
libVLSK_gv_capturePoint_ControllingSound_Enemy[lp_owningTeam] = SoundLastPlayed();
}
else if (auto24C3265E_val == 40) {
SoundPlayForPlayer(SoundLink("UI_Game_Volskaya_CapturePoint_Controlling_Enemy04", -1), c_maxPlayers, libGame_gf_PlayersOnTeamHeroes(lv_enemyTeam, false), 100.0, 0.0);
libVLSK_gv_capturePoint_ControllingSound_Enemy[lp_owningTeam] = SoundLastPlayed();
}
else if (auto24C3265E_val == 50) {
SoundPlayForPlayer(SoundLink("UI_Game_Volskaya_CapturePoint_Controlling_Enemy05", -1), c_maxPlayers, libGame_gf_PlayersOnTeamHeroes(lv_enemyTeam, false), 100.0, 0.0);
libVLSK_gv_capturePoint_ControllingSound_Enemy[lp_owningTeam] = SoundLastPlayed();
}
else if (auto24C3265E_val == 60) {
SoundPlayForPlayer(SoundLink("UI_Game_Volskaya_CapturePoint_Controlling_Enemy06", -1), c_maxPlayers, libGame_gf_PlayersOnTeamHeroes(lv_enemyTeam, false), 100.0, 0.0);
libVLSK_gv_capturePoint_ControllingSound_Enemy[lp_owningTeam] = SoundLastPlayed();
}
else if (auto24C3265E_val == 70) {
SoundPlayForPlayer(SoundLink("UI_Game_Volskaya_CapturePoint_Controlling_Enemy07", -1), c_maxPlayers, libGame_gf_PlayersOnTeamHeroes(lv_enemyTeam, false), 100.0, 0.0);
libVLSK_gv_capturePoint_ControllingSound_Enemy[lp_owningTeam] = SoundLastPlayed();
}
else if (auto24C3265E_val == 80) {
SoundPlayForPlayer(SoundLink("UI_Game_Volskaya_CapturePoint_Controlling_Enemy08", -1), c_maxPlayers, libGame_gf_PlayersOnTeamHeroes(lv_enemyTeam, false), 100.0, 0.0);
libVLSK_gv_capturePoint_ControllingSound_Enemy[lp_owningTeam] = SoundLastPlayed();
SoundPlayForPlayer(SoundLink("UI_Game_Volskaya_CapturePoint_Controlling_Ally00", -1), c_maxPlayers, libGame_gf_PlayersOnTeamHeroes(lp_owningTeam, false), 100.0, 0.0);
libVLSK_gv_capturePoint_ControllingSound_Ally[lp_owningTeam] = SoundLastPlayed();
}
else if (auto24C3265E_val == 90) {
SoundPlayForPlayer(SoundLink("UI_Game_Volskaya_CapturePoint_Controlling_Enemy09", -1), c_maxPlayers, libGame_gf_PlayersOnTeamHeroes(lv_enemyTeam, false), 100.0, 0.0);
libVLSK_gv_capturePoint_ControllingSound_Enemy[lp_owningTeam] = SoundLastPlayed();
SoundPlayForPlayer(SoundLink("UI_Game_Volskaya_CapturePoint_Controlling_Ally01", -1), c_maxPlayers, libGame_gf_PlayersOnTeamHeroes(lp_owningTeam, false), 100.0, 0.0);
libVLSK_gv_capturePoint_ControllingSound_Ally[lp_owningTeam] = SoundLastPlayed();
}
else if (auto24C3265E_val == 100) {
SoundStop(libVLSK_gv_capturePoint_ControllingSound_Ally[lp_owningTeam], false);
SoundStop(libVLSK_gv_capturePoint_ControllingSound_Enemy[lp_owningTeam], false);
libVLSK_gv_capturePoint_ControllingSound_Ally[lp_owningTeam] = null;
libVLSK_gv_capturePoint_ControllingSound_Enemy[lp_owningTeam] = null;
SoundStop(libVLSK_gv_capturePoint_ControllingSound_Ally[lv_enemyTeam], false);
SoundStop(libVLSK_gv_capturePoint_ControllingSound_Enemy[lv_enemyTeam], false);
libVLSK_gv_capturePoint_ControllingSound_Ally[lv_enemyTeam] = null;
libVLSK_gv_capturePoint_ControllingSound_Enemy[lv_enemyTeam] = null;
}
else {
}
}
}
void libVLSK_gf_PauseUnpauseControllingSoundsForTeam (bool lp_pauseUnpause, int lp_team) {
// Automatic Variable Declarations
// Implementation
SoundPause(libVLSK_gv_capturePoint_ControllingSound_Ally[lp_team], lp_pauseUnpause);
SoundPause(libVLSK_gv_capturePoint_ControllingSound_Enemy[lp_team], lp_pauseUnpause);
}
void libVLSK_gf_InitializeVolskayaUI () {
// Automatic Variable Declarations
// Implementation
DialogControlCreateInPanelFromTemplate(libUIUI_gv_mapMechanicsPanel.lv_mainPanel, c_triggerControlTypePanel, "VolskayaMapMechanic/VolskayaCapturePointPanel");
DialogControlSetObservedType(DialogControlLastCreated(), c_triggerObservedTypeDefaultObservedPlayerId);
libVLSK_gv_volskayaUI.lv_mapMechanic_Container = DialogControlLastCreated();
DialogControlSetVisible(libVLSK_gv_volskayaUI.lv_mapMechanic_Container, PlayerGroupAll(), false);
DialogControlHookup(libVLSK_gv_volskayaUI.lv_mapMechanic_Container, c_triggerControlTypeProgressBar, "ContestProgressBar");
libVLSK_gv_volskayaUI.lv_mapMechanic_ContestProgressBar = DialogControlLastCreated();
DialogControlHookup(libVLSK_gv_volskayaUI.lv_mapMechanic_Container, c_triggerControlTypeImage, "ContestProgressBar/FillImageContainer/FillImage");
libVLSK_gv_volskayaUI.lv_mapMechanic_ContestProgressBar_FillImage = DialogControlLastCreated();
DialogControlHookup(libVLSK_gv_volskayaUI.lv_mapMechanic_Container, c_triggerControlTypeLabel, "OrderControlLabel");
libVLSK_gv_volskayaUI.lv_mapMechanic_VictoryProgress_OrderLabel = DialogControlLastCreated();
DialogControlHookup(libVLSK_gv_volskayaUI.lv_mapMechanic_Container, c_triggerControlTypeLabel, "ChaosControlLabel");
libVLSK_gv_volskayaUI.lv_mapMechanic_VictoryProgress_ChaosLabel = DialogControlLastCreated();
DialogControlHookup(libVLSK_gv_volskayaUI.lv_mapMechanic_Container, c_triggerControlTypeImage, "OrderControlPanelStroke");
libVLSK_gv_volskayaUI.lv_mapMechanic_VictoryProgress_OrderStroke = DialogControlLastCreated();
DialogControlHookup(libVLSK_gv_volskayaUI.lv_mapMechanic_Container, c_triggerControlTypeImage, "ChaosControlPanelStroke");
libVLSK_gv_volskayaUI.lv_mapMechanic_VictoryProgress_ChaosStroke = DialogControlLastCreated();
DialogControlHookup(libVLSK_gv_volskayaUI.lv_mapMechanic_Container, c_triggerControlTypeImage, "OrderControlPanelFill");
libVLSK_gv_volskayaUI.lv_mapMechanic_VictoryProgress_OrderFill = DialogControlLastCreated();
DialogControlSetVisible(libVLSK_gv_volskayaUI.lv_mapMechanic_VictoryProgress_OrderFill, PlayerGroupAll(), false);
DialogControlHookup(libVLSK_gv_volskayaUI.lv_mapMechanic_Container, c_triggerControlTypeImage, "ChaosControlPanelFill");
libVLSK_gv_volskayaUI.lv_mapMechanic_VictoryProgress_ChaosFill = DialogControlLastCreated();
DialogControlSetVisible(libVLSK_gv_volskayaUI.lv_mapMechanic_VictoryProgress_ChaosFill, PlayerGroupAll(), false);
DialogControlHookup(libVLSK_gv_volskayaUI.lv_mapMechanic_Container, c_triggerControlTypeLabel, "ContestedLabel");
libVLSK_gv_volskayaUI.lv_mapMechanic_ContestedLabel = DialogControlLastCreated();
DialogControlSetVisible(libVLSK_gv_volskayaUI.lv_mapMechanic_ContestedLabel, PlayerGroupAll(), false);
DialogControlHookup(libVLSK_gv_volskayaUI.lv_mapMechanic_Container, c_triggerControlTypeImage, "CenterCircle");
libVLSK_gv_volskayaUI.lv_mapMechanic_CenterCircle = DialogControlLastCreated();
DialogControlHookup(libVLSK_gv_volskayaUI.lv_mapMechanic_Container, c_triggerControlTypeImage, "CenterPointIndicator");
libVLSK_gv_volskayaUI.lv_mapMechanic_CenterIndicator = DialogControlLastCreated();
DialogControlCreateInPanelFromTemplate(libUIUI_gv_mapMechanicsPanel.lv_mainPanel, c_triggerControlTypePanel, "VolskayaMapMechanic/VolskayaToastContainer");
libVLSK_gv_volskayaUI.lv_slideout_Container = DialogControlLastCreated();
DialogControlSetObservedType(libVLSK_gv_volskayaUI.lv_slideout_Container, c_triggerObservedTypeDefaultObservedPlayerId);
DialogControlSetVisible(libVLSK_gv_volskayaUI.lv_slideout_Container, PlayerGroupAll(), false);
DialogControlHookup(libVLSK_gv_volskayaUI.lv_slideout_Container, c_triggerControlTypePanel, "ToastNotification");
libVLSK_gv_volskayaUI.lv_slideout_ToastNotification = DialogControlLastCreated();
DialogControlHookup(libVLSK_gv_volskayaUI.lv_slideout_Container, c_triggerControlTypeLabel, "ToastNotification/InfoLabel");
libVLSK_gv_volskayaUI.lv_slideout_InfoLabel = DialogControlLastCreated();
DialogControlHookup(libVLSK_gv_volskayaUI.lv_slideout_Container, c_triggerControlTypeLabel, "ToastNotification/TimerLabel");
libVLSK_gv_volskayaUI.lv_slideout_TimerLabel = DialogControlLastCreated();
DialogControlHookup(libVLSK_gv_volskayaUI.lv_slideout_Container, c_triggerControlTypeImage, "ToastNotification/NotificationIconA");
libVLSK_gv_volskayaUI.lv_slideout_IconA = DialogControlLastCreated();
DialogControlHookup(libVLSK_gv_volskayaUI.lv_slideout_Container, c_triggerControlTypeImage, "ToastNotification/NotificationIconB");
libVLSK_gv_volskayaUI.lv_slideout_IconB = DialogControlLastCreated();
DialogControlHookup(libVLSK_gv_volskayaUI.lv_slideout_Container, c_triggerControlTypeImage, "ToastNotification/NotificationIconC");
libVLSK_gv_volskayaUI.lv_slideout_IconC = DialogControlLastCreated();
DialogControlCreateInPanelFromTemplate(libUIUI_gv_mapMechanicsPanel.lv_mainPanel, c_triggerControlTypePanel, "VolskayaMapMechanic/VolskayaOvertimePanel");
DialogControlSetObservedType(DialogControlLastCreated(), c_triggerObservedTypeDefaultObservedPlayerId);
DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
libVLSK_gv_volskayaUI.lv_overtimeBar_Container = DialogControlLastCreated();
DialogControlHookup(libVLSK_gv_volskayaUI.lv_overtimeBar_Container, c_triggerControlTypeProgressBar, "OvertimeProgressBar");
DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), true);
libVLSK_gv_volskayaUI.lv_overtimeBar_ProgressBar = DialogControlLastCreated();
DialogControlCreateInPanelFromTemplate(libUIUI_gv_mapMechanicsPanel.lv_mainPanel, c_triggerControlTypePanel, "VolskayaMapMechanic/VolskayaRobotHealthSlideout");
DialogControlSetObservedType(DialogControlLastCreated(), c_triggerObservedTypeDefaultObservedPlayerId);
DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
libVLSK_gv_volskayaUI.lv_robot_Container = DialogControlLastCreated();
DialogControlHookup(libVLSK_gv_volskayaUI.lv_robot_Container, c_triggerControlTypeLabel, "RobotTimer");
libVLSK_gv_volskayaUI.lv_robot_TimeLabel = DialogControlLastCreated();
DialogControlHookup(libVLSK_gv_volskayaUI.lv_robot_Container, c_triggerControlTypeUnitStatus, "RobotStatusFrame");
libVLSK_gv_volskayaUI.lv_robot_StatusFrame = DialogControlLastCreated();
DialogControlHookup(libVLSK_gv_volskayaUI.lv_robot_Container, c_triggerControlTypeImage, "GunnerPlayerIcon");
libVLSK_gv_volskayaUI.lv_robot_GunnerPortrait = DialogControlLastCreated();
DialogControlHookup(libVLSK_gv_volskayaUI.lv_robot_Container, c_triggerControlTypeImage, "PilotPlayerIcon");
libVLSK_gv_volskayaUI.lv_robot_PilotPortrait = DialogControlLastCreated();
DialogControlHookup(libVLSK_gv_volskayaUI.lv_robot_Container, c_triggerControlTypeImage, "DeathIcon1");
libVLSK_gv_volskayaUI.lv_robot_DeathIcon1 = DialogControlLastCreated();
DialogControlHookup(libVLSK_gv_volskayaUI.lv_robot_Container, c_triggerControlTypeImage, "DeathIcon2");
libVLSK_gv_volskayaUI.lv_robot_DeathIcon2 = DialogControlLastCreated();
DialogControlHookup(libVLSK_gv_volskayaUI.lv_robot_Container, c_triggerControlTypeImage, "DeathIcon3");
libVLSK_gv_volskayaUI.lv_robot_DeathIcon3 = DialogControlLastCreated();
DialogControlHookup(libVLSK_gv_volskayaUI.lv_robot_Container, c_triggerControlTypeImage, "RobotIcon");
libVLSK_gv_volskayaUI.lv_robot_RobotIcon = DialogControlLastCreated();
}
void libVLSK_gf_UpdateUIControlFrameColors (int lp_currentOwner) {
// Automatic Variable Declarations
int auto8A08096D_val;
// Implementation
auto8A08096D_val = lp_currentOwner;
if (auto8A08096D_val == libCore_gv_cOMPUTER_Neutral) {
DialogControlSetAnimationState(libVLSK_gv_volskayaUI.lv_mapMechanic_CenterCircle, PlayerGroupAll(), "TeamOwnershipColor", "Neutral");
DialogControlSetVisible(libVLSK_gv_volskayaUI.lv_mapMechanic_VictoryProgress_OrderFill, PlayerGroupAll(), false);
DialogControlSetVisible(libVLSK_gv_volskayaUI.lv_mapMechanic_VictoryProgress_ChaosFill, PlayerGroupAll(), false);
}
else if (auto8A08096D_val == libGame_gv_teamOrderIndex_C) {
DialogControlSetAnimationState(libVLSK_gv_volskayaUI.lv_mapMechanic_CenterCircle, PlayerGroupAll(), "TeamOwnershipColor", "Order");
DialogControlSetVisible(libVLSK_gv_volskayaUI.lv_mapMechanic_VictoryProgress_OrderFill, PlayerGroupAll(), true);
DialogControlSetVisible(libVLSK_gv_volskayaUI.lv_mapMechanic_VictoryProgress_ChaosFill, PlayerGroupAll(), false);
}
else if (auto8A08096D_val == libGame_gv_teamChaosIndex_C) {
DialogControlSetAnimationState(libVLSK_gv_volskayaUI.lv_mapMechanic_CenterCircle, PlayerGroupAll(), "TeamOwnershipColor", "Chaos");
DialogControlSetVisible(libVLSK_gv_volskayaUI.lv_mapMechanic_VictoryProgress_OrderFill, PlayerGroupAll(), false);
DialogControlSetVisible(libVLSK_gv_volskayaUI.lv_mapMechanic_VictoryProgress_ChaosFill, PlayerGroupAll(), true);
}
else {
}
}
void libVLSK_gf_UpdateUIContestBarProgress () {
// Variable Declarations
int lv_teamWithProgress;
fixed lv_percentProgress;
// Automatic Variable Declarations
// Variable Initialization
// Implementation
if ((libVLSK_gv_capturePoints[libVLSK_gv_currentCapturePoint].lv_contestTimes[libGame_gv_teamOrderIndex_C] >= libVLSK_gv_capturePoints[libVLSK_gv_currentCapturePoint].lv_contestTimes[libGame_gv_teamChaosIndex_C])) {
lv_teamWithProgress = libGame_gv_teamOrderIndex_C;
DialogControlSetAnimationState(libVLSK_gv_volskayaUI.lv_mapMechanic_ContestProgressBar_FillImage, PlayerGroupAll(), "TeamColor", "Order");
}
else {
lv_teamWithProgress = libGame_gv_teamChaosIndex_C;
DialogControlSetAnimationState(libVLSK_gv_volskayaUI.lv_mapMechanic_ContestProgressBar_FillImage, PlayerGroupAll(), "TeamColor", "Chaos");
}
lv_percentProgress = (libVLSK_gv_capturePoints[libVLSK_gv_currentCapturePoint].lv_contestTimes[lv_teamWithProgress] / libVLSK_gv_capturePointContestTimeGoal_C);
libNtve_gf_SetDialogItemCurrentValue(libVLSK_gv_volskayaUI.lv_mapMechanic_ContestProgressBar, lv_percentProgress, PlayerGroupAll());
}
void libVLSK_gf_UpdateUIVictoryPercentLabels () {
// Automatic Variable Declarations
// Implementation
TextExpressionSetToken("Param/Expression/lib_VLSK_5659D0D4", "A", IntToText(libVLSK_gf_GetCapturePointVictoryProgressasInt(libVLSK_gv_currentCapturePoint, libGame_gv_teamOrderIndex_C)));
libNtve_gf_SetDialogItemText(libVLSK_gv_volskayaUI.lv_mapMechanic_VictoryProgress_OrderLabel, TextExpressionAssemble("Param/Expression/lib_VLSK_5659D0D4"), PlayerGroupAll());
TextExpressionSetToken("Param/Expression/lib_VLSK_D5F24B64", "A", IntToText(libVLSK_gf_GetCapturePointVictoryProgressasInt(libVLSK_gv_currentCapturePoint, libGame_gv_teamChaosIndex_C)));
libNtve_gf_SetDialogItemText(libVLSK_gv_volskayaUI.lv_mapMechanic_VictoryProgress_ChaosLabel, TextExpressionAssemble("Param/Expression/lib_VLSK_D5F24B64"), PlayerGroupAll());
}
void libVLSK_gf_UpdateUIControlPointIndicatorImage () {
// Automatic Variable Declarations
// Implementation
libNtve_gf_SetDialogItemImage(libVLSK_gv_volskayaUI.lv_mapMechanic_CenterIndicator, libVLSK_gv_capturePoints[libVLSK_gv_currentCapturePoint].lv_controlIndicatorImage, PlayerGroupAll());
}
void libVLSK_gf_EnableDisableUIContestedCalloutDialog (bool lp_enableOrDisable) {
// Automatic Variable Declarations
// Implementation
if ((lp_enableOrDisable == true)) {
libVLSK_gv_capturePoints[libVLSK_gv_currentCapturePoint].lv_isContested = true;
DialogControlSetVisible(libVLSK_gv_volskayaUI.lv_mapMechanic_ContestedLabel, PlayerGroupAll(), true);
}
else {
libVLSK_gv_capturePoints[libVLSK_gv_currentCapturePoint].lv_isContested = false;
DialogControlSetVisible(libVLSK_gv_volskayaUI.lv_mapMechanic_ContestedLabel, PlayerGroupAll(), false);
}
}
trigger auto_libVLSK_gf_ShowCapturePointWarningSlideoutWithPing_Trigger = null;
int auto_libVLSK_gf_ShowCapturePointWarningSlideoutWithPing_lp_point;
void libVLSK_gf_ShowCapturePointWarningSlideoutWithPing (int lp_point) {
auto_libVLSK_gf_ShowCapturePointWarningSlideoutWithPing_lp_point = lp_point;
if (auto_libVLSK_gf_ShowCapturePointWarningSlideoutWithPing_Trigger == null) {
auto_libVLSK_gf_ShowCapturePointWarningSlideoutWithPing_Trigger = TriggerCreate("auto_libVLSK_gf_ShowCapturePointWarningSlideoutWithPing_TriggerFunc");
}
TriggerExecute(auto_libVLSK_gf_ShowCapturePointWarningSlideoutWithPing_Trigger, false, false);
}
bool auto_libVLSK_gf_ShowCapturePointWarningSlideoutWithPing_TriggerFunc (bool testConds, bool runActions) {
int lp_point = auto_libVLSK_gf_ShowCapturePointWarningSlideoutWithPing_lp_point;
// Variable Declarations
fixed lv_pingShownTime_C;
int lv_secondsLeft;
int lv_ping;
// Automatic Variable Declarations
int auto553CCD14_val;
const int auto4E41B909_ae = 1;
const int auto4E41B909_ai = -1;
// Variable Initialization
lv_pingShownTime_C = 5.0;
lv_ping = c_invalidPingId;
// Implementation
UnitRemove(libVLSK_gv_capturePoints[lp_point].lv_minimapIconUnit);
libNtve_gf_CreateUnitsWithDefaultFacing(1, libVLSK_gv_capturePoints[lp_point].lv_minimapIconUnitType, c_unitCreateIgnorePlacement, libCore_gv_cOMPUTER_Neutral, RegionGetCenter(libVLSK_gv_capturePoints[lp_point].lv_region), null);
libVLSK_gv_capturePoints[lp_point].lv_minimapIconUnit = UnitLastCreated();
PingCreateFromData(PlayerGroupAll(), "StormAlert", RegionGetCenter(libVLSK_gv_capturePoints[libVLSK_gv_currentCapturePoint].lv_region));
lv_ping = PingLastCreated();
DialogControlSetVisible(libVLSK_gv_volskayaUI.lv_slideout_IconA, PlayerGroupAll(), false);
DialogControlSetVisible(libVLSK_gv_volskayaUI.lv_slideout_IconB, PlayerGroupAll(), false);
DialogControlSetVisible(libVLSK_gv_volskayaUI.lv_slideout_IconC, PlayerGroupAll(), false);
auto553CCD14_val = lp_point;
if (auto553CCD14_val == 1) {
DialogControlSetVisible(libVLSK_gv_volskayaUI.lv_slideout_IconA, PlayerGroupAll(), true);
}
else if (auto553CCD14_val == 2) {
DialogControlSetVisible(libVLSK_gv_volskayaUI.lv_slideout_IconB, PlayerGroupAll(), true);
}
else if (auto553CCD14_val == 3) {
DialogControlSetVisible(libVLSK_gv_volskayaUI.lv_slideout_IconC, PlayerGroupAll(), true);
}
else {
}
libNtve_gf_SetDialogItemText(libVLSK_gv_volskayaUI.lv_slideout_InfoLabel, StringExternal("Param/Value/lib_VLSK_81009092"), PlayerGroupAll());
DialogControlSetVisible(libVLSK_gv_volskayaUI.lv_slideout_Container, PlayerGroupAll(), true);
lv_secondsLeft = FixedToInt(libVLSK_gv_warningTimerDuration);
for ( ; ( (auto4E41B909_ai >= 0 && lv_secondsLeft <= auto4E41B909_ae) || (auto4E41B909_ai < 0 && lv_secondsLeft >= auto4E41B909_ae) ) ; lv_secondsLeft += auto4E41B909_ai ) {
libNtve_gf_SetDialogItemText(libVLSK_gv_volskayaUI.lv_slideout_TimerLabel, libVLSK_gf_GetFormattedTimeRemaining(lv_secondsLeft), PlayerGroupAll());
if ((lv_ping != c_invalidPingId) && (lv_secondsLeft <= FixedToInt((libVLSK_gv_warningTimerDuration - lv_pingShownTime_C)))) {
PingDestroy(lv_ping);
}
Wait(1.0, c_timeGame);
}
DialogControlSendAnimationEvent(libVLSK_gv_volskayaUI.lv_slideout_Container, PlayerGroupAll(), "PlaySlideOut");
return true;
}
trigger auto_libVLSK_gf_ShowCapturePointCompletedSlideout_Trigger = null;
int auto_libVLSK_gf_ShowCapturePointCompletedSlideout_lp_victoryTeam;
void libVLSK_gf_ShowCapturePointCompletedSlideout (int lp_victoryTeam) {
auto_libVLSK_gf_ShowCapturePointCompletedSlideout_lp_victoryTeam = lp_victoryTeam;
if (auto_libVLSK_gf_ShowCapturePointCompletedSlideout_Trigger == null) {
auto_libVLSK_gf_ShowCapturePointCompletedSlideout_Trigger = TriggerCreate("auto_libVLSK_gf_ShowCapturePointCompletedSlideout_TriggerFunc");
}
TriggerExecute(auto_libVLSK_gf_ShowCapturePointCompletedSlideout_Trigger, false, false);
}
bool auto_libVLSK_gf_ShowCapturePointCompletedSlideout_TriggerFunc (bool testConds, bool runActions) {
int lp_victoryTeam = auto_libVLSK_gf_ShowCapturePointCompletedSlideout_lp_victoryTeam;
// Variable Declarations
int lv_losingTeam;
// Automatic Variable Declarations
// Variable Initialization
lv_losingTeam = libGame_gf_EnemyTeam(lp_victoryTeam);
// Implementation
libNtve_gf_SetDialogItemStyle(libVLSK_gv_volskayaUI.lv_slideout_InfoLabel, "Storm_MapMechanic_MechanicTimerCentered_Blue", GameAttributePlayersForTeam(lp_victoryTeam));
libNtve_gf_SetDialogItemText(libVLSK_gv_volskayaUI.lv_slideout_InfoLabel, StringExternal("Param/Value/lib_VLSK_92476A52"), GameAttributePlayersForTeam(lp_victoryTeam));
libNtve_gf_SetDialogItemStyle(libVLSK_gv_volskayaUI.lv_slideout_InfoLabel, "Storm_MapMechanic_MechanicTimerCentered_Red", GameAttributePlayersForTeam(lv_losingTeam));
libNtve_gf_SetDialogItemText(libVLSK_gv_volskayaUI.lv_slideout_InfoLabel, StringExternal("Param/Value/lib_VLSK_4D8B96E5"), GameAttributePlayersForTeam(lv_losingTeam));
DialogControlSetVisible(libVLSK_gv_volskayaUI.lv_slideout_TimerLabel, PlayerGroupAll(), false);
DialogControlSendAnimationEvent(libVLSK_gv_volskayaUI.lv_slideout_ToastNotification, PlayerGroupAll(), "Show");
Wait(2.0, c_timeGame);
DialogControlSendAnimationEvent(libVLSK_gv_volskayaUI.lv_slideout_ToastNotification, PlayerGroupAll(), "Hide");
return true;
}
text libVLSK_gf_GetFormattedTimeRemaining (int lp_rawTime) {
// Variable Declarations
string lv_minutes;
string lv_seconds;
// Automatic Variable Declarations
// Variable Initialization
lv_minutes = "";
lv_seconds = "";
// Implementation
if ((lp_rawTime >= 600)) {
lv_minutes = IntToString((lp_rawTime / 60));
}
else {
if ((lp_rawTime >= 60)) {
lv_minutes = ("0" + IntToString((lp_rawTime / 60)));
}
else {
lv_minutes = "00";
}
}
if ((ModI(lp_rawTime, 60) >= 10)) {
lv_seconds = IntToString(ModI(lp_rawTime, 60));
}
else {
if ((lp_rawTime >= 1)) {
lv_seconds = ("0" + IntToString(ModI(lp_rawTime, 60)));
}
else {
lv_seconds = "00";
}
}
return (StringToText(lv_minutes) + StringExternal("Param/Value/lib_VLSK_C6DFF59B") + StringToText(lv_seconds));
}
void libVLSK_gf_EnableDisableOvertimeBar (bool lp_enableOrDisable) {
// Automatic Variable Declarations
// Implementation
if ((lp_enableOrDisable == true)) {
DialogControlSetVisible(libVLSK_gv_volskayaUI.lv_overtimeBar_Container, PlayerGroupAll(), true);
if ((libVLSK_gv_overtimeActive == false)) {
libVLSK_gv_overtimeActive = true;
SoundPlayForPlayer(SoundLinkNoIndex("UI_Game_Ping_Volskaya_Overtime"), c_maxPlayers, PlayerGroupAll(), 100.0, 0.0);
}
}
else {
DialogControlSetVisible(libVLSK_gv_volskayaUI.lv_overtimeBar_Container, PlayerGroupAll(), false);
libVLSK_gv_overtimeActive = false;
}
}
void libVLSK_gf_UpdateOvertimeBarforPoint (int lp_capturePointIndex) {
// Automatic Variable Declarations
// Implementation
libNtve_gf_SetDialogItemCurrentValue(libVLSK_gv_volskayaUI.lv_overtimeBar_ProgressBar, (libVLSK_gv_capturePoints[lp_capturePointIndex].lv_overtimeRemaining / libVLSK_gv_capturePointOvertimeTime_C), PlayerGroupAll());
}
trigger auto_libVLSK_gf_ShowRobotSlideoutStatusFrameforUnit_Trigger = null;
unit auto_libVLSK_gf_ShowRobotSlideoutStatusFrameforUnit_lp_robotUnit;
void libVLSK_gf_ShowRobotSlideoutStatusFrameforUnit (unit lp_robotUnit) {
auto_libVLSK_gf_ShowRobotSlideoutStatusFrameforUnit_lp_robotUnit = lp_robotUnit;
if (auto_libVLSK_gf_ShowRobotSlideoutStatusFrameforUnit_Trigger == null) {
auto_libVLSK_gf_ShowRobotSlideoutStatusFrameforUnit_Trigger = TriggerCreate("auto_libVLSK_gf_ShowRobotSlideoutStatusFrameforUnit_TriggerFunc");
}
TriggerExecute(auto_libVLSK_gf_ShowRobotSlideoutStatusFrameforUnit_Trigger, false, false);
}
bool auto_libVLSK_gf_ShowRobotSlideoutStatusFrameforUnit_TriggerFunc (bool testConds, bool runActions) {
unit lp_robotUnit = auto_libVLSK_gf_ShowRobotSlideoutStatusFrameforUnit_lp_robotUnit;
// Variable Declarations
int lv_owningTeam;
int lv_enemyTeam;
fixed lv_timedLifeRemaining;
// Automatic Variable Declarations
// Variable Initialization
lv_owningTeam = libGame_gf_TeamNumberOfPlayer(UnitGetOwner(lp_robotUnit));
lv_enemyTeam = libGame_gf_EnemyTeam(lv_owningTeam);
// Implementation
libNtve_gf_SetDialogItemUnit(libVLSK_gv_volskayaUI.lv_robot_StatusFrame, lp_robotUnit, PlayerGroupAll());
libVLSK_gf_SetPilotPortrait(null);
libVLSK_gf_SetGunnerPortrait(null);
DialogControlSetVisible(libVLSK_gv_volskayaUI.lv_robot_Container, PlayerGroupAll(), true);
while ((UnitIsAlive(lp_robotUnit) == true)) {
lv_timedLifeRemaining = (FixedToInt(UnitBehaviorDuration(lp_robotUnit, "VehicleDragonTimedLife")) + 1);
libNtve_gf_SetDialogItemText(libVLSK_gv_volskayaUI.lv_robot_TimeLabel, TextTimeFormat(StringToText("<mintotal/>:<sec2/>"), FixedToInt(lv_timedLifeRemaining)), PlayerGroupAll());
Wait(0.0625, c_timeGame);
}
DialogControlSendAnimationEvent(libVLSK_gv_volskayaUI.lv_robot_DeathIcon1, PlayerGroupAll(), "PlayDeathJitter");
DialogControlSendAnimationEvent(libVLSK_gv_volskayaUI.lv_robot_DeathIcon2, PlayerGroupAll(), "PlayDeathJitter");
DialogControlSendAnimationEvent(libVLSK_gv_volskayaUI.lv_robot_DeathIcon3, PlayerGroupAll(), "PlayDeathJitter");
DialogControlSendAnimationEvent(libVLSK_gv_volskayaUI.lv_robot_RobotIcon, PlayerGroupAll(), "PlayDeathJitter");
Wait(1.0, c_timeGame);
DialogControlSendAnimationEvent(libVLSK_gv_volskayaUI.lv_robot_Container, PlayerGroupAll(), "PlaySlideOut");
return true;
}
void libVLSK_gf_SetPilotPortrait (unit lp_unit) {
// Automatic Variable Declarations
// Implementation
if ((lp_unit == null)) {
DialogControlSetVisible(libVLSK_gv_volskayaUI.lv_robot_PilotPortrait, PlayerGroupAll(), false);
}
else {
libNtve_gf_SetDialogItemImage(libVLSK_gv_volskayaUI.lv_robot_PilotPortrait, libUIUI_gf_KillLogGetPortraitPathforUnit(lp_unit), PlayerGroupAll());
DialogControlSetVisible(libVLSK_gv_volskayaUI.lv_robot_PilotPortrait, PlayerGroupAll(), true);
}
}
void libVLSK_gf_SetGunnerPortrait (unit lp_unit) {
// Automatic Variable Declarations
// Implementation
if ((lp_unit == null)) {
DialogControlSetVisible(libVLSK_gv_volskayaUI.lv_robot_GunnerPortrait, PlayerGroupAll(), false);
}
else {
libNtve_gf_SetDialogItemImage(libVLSK_gv_volskayaUI.lv_robot_GunnerPortrait, libUIUI_gf_KillLogGetPortraitPathforUnit(lp_unit), PlayerGroupAll());
DialogControlSetVisible(libVLSK_gv_volskayaUI.lv_robot_GunnerPortrait, PlayerGroupAll(), true);
}
}
trigger auto_libVLSK_gf_PlayVOControlPointWarning_Trigger = null;
void libVLSK_gf_PlayVOControlPointWarning () {
if (auto_libVLSK_gf_PlayVOControlPointWarning_Trigger == null) {
auto_libVLSK_gf_PlayVOControlPointWarning_Trigger = TriggerCreate("auto_libVLSK_gf_PlayVOControlPointWarning_TriggerFunc");
}
TriggerExecute(auto_libVLSK_gf_PlayVOControlPointWarning_Trigger, false, false);
}
bool auto_libVLSK_gf_PlayVOControlPointWarning_TriggerFunc (bool testConds, bool runActions) {
// Automatic Variable Declarations
// Implementation
Wait(0.5, c_timeGame);
if ((libGame_gv_gameOver == true)) {
return true;
}
libVLSK_gf_ResetAllVOUserData();
UserDataSetInt("MapVOEvent", "Volskaya - Terminals Soon", "Value", 1, 1);
if ((libVLSK_gv_useFirstEventVoiceover == true)) {
UserDataSetInt("MapVOEvent", "Volskaya - Terminals Soon First", "Value", 1, 1);
}
ConversationDataRun("VolskayaIndustriesVO", PlayerGroupAll(), c_conversationSkipNone, false);
return true;
}
trigger auto_libVLSK_gf_PlayVOControlPointEnabled_Trigger = null;
void libVLSK_gf_PlayVOControlPointEnabled () {
if (auto_libVLSK_gf_PlayVOControlPointEnabled_Trigger == null) {
auto_libVLSK_gf_PlayVOControlPointEnabled_Trigger = TriggerCreate("auto_libVLSK_gf_PlayVOControlPointEnabled_TriggerFunc");
}
TriggerExecute(auto_libVLSK_gf_PlayVOControlPointEnabled_Trigger, false, false);
}
bool auto_libVLSK_gf_PlayVOControlPointEnabled_TriggerFunc (bool testConds, bool runActions) {
// Automatic Variable Declarations
// Implementation
if ((libGame_gv_gameOver == true)) {
return true;
}
libVLSK_gf_ResetAllVOUserData();
UserDataSetInt("MapVOEvent", "Volskaya - Terminals Active", "Value", 1, 1);
if ((libVLSK_gv_useFirstEventVoiceover == true)) {
UserDataSetInt("MapVOEvent", "Volskaya - Terminals Active First", "Value", 1, 1);
}
ConversationDataRun("VolskayaIndustriesVO", PlayerGroupAll(), c_conversationSkipNone, false);
return true;
}
trigger auto_libVLSK_gf_PlayVOControlPointCompleted_Trigger = null;
int auto_libVLSK_gf_PlayVOControlPointCompleted_lp_winningTeam;
void libVLSK_gf_PlayVOControlPointCompleted (int lp_winningTeam) {
auto_libVLSK_gf_PlayVOControlPointCompleted_lp_winningTeam = lp_winningTeam;
if (auto_libVLSK_gf_PlayVOControlPointCompleted_Trigger == null) {
auto_libVLSK_gf_PlayVOControlPointCompleted_Trigger = TriggerCreate("auto_libVLSK_gf_PlayVOControlPointCompleted_TriggerFunc");
}
TriggerExecute(auto_libVLSK_gf_PlayVOControlPointCompleted_Trigger, false, false);
}
bool auto_libVLSK_gf_PlayVOControlPointCompleted_TriggerFunc (bool testConds, bool runActions) {
int lp_winningTeam = auto_libVLSK_gf_PlayVOControlPointCompleted_lp_winningTeam;
// Variable Declarations
playergroup lv_winningTeamGroup;
playergroup lv_enemyTeamGroup;
playergroup lv_observerGroup;
// Automatic Variable Declarations
// Variable Initialization
lv_winningTeamGroup = libGame_gf_PlayersOnTeamHeroes(lp_winningTeam, false);
lv_enemyTeamGroup = libGame_gf_PlayersOnTeamHeroes(libGame_gf_EnemyTeam(lp_winningTeam), false);
lv_observerGroup = PlayerGroupSingle(libCore_gv_oBSERVER_ObserverUIPlayer);
// Implementation
Wait(0.8, c_timeGame);
if ((libGame_gv_gameOver == true)) {
return true;
}
libVLSK_gf_ResetAllVOUserData();
UserDataSetInt("MapVOEvent", "Volskaya - Left Captures", "Value", 1, 1);
if ((libVLSK_gv_useFirstEventVoiceover == true)) {
libVLSK_gv_useFirstEventVoiceover = false;
UserDataSetInt("MapVOEvent", "Volskaya - Left Captures First", "Value", 1, 1);
}
ConversationDataLineSetPlayers("VolskayaIndustriesVO", ("Left"), lv_winningTeamGroup);
ConversationDataLineSetPlayers("VolskayaIndustriesVO", ("Right"), lv_enemyTeamGroup);
ConversationDataLineSetPlayers("VolskayaIndustriesVO", ("Observer"), lv_observerGroup);
ConversationDataRun("VolskayaIndustriesVO", PlayerGroupAll(), c_conversationSkipNone, false);
return true;
}
trigger auto_libVLSK_gf_PlayVORobotNeedsaPilot_Trigger = null;
int auto_libVLSK_gf_PlayVORobotNeedsaPilot_lp_robotTeam;
void libVLSK_gf_PlayVORobotNeedsaPilot (int lp_robotTeam) {
auto_libVLSK_gf_PlayVORobotNeedsaPilot_lp_robotTeam = lp_robotTeam;
if (auto_libVLSK_gf_PlayVORobotNeedsaPilot_Trigger == null) {
auto_libVLSK_gf_PlayVORobotNeedsaPilot_Trigger = TriggerCreate("auto_libVLSK_gf_PlayVORobotNeedsaPilot_TriggerFunc");
}
TriggerExecute(auto_libVLSK_gf_PlayVORobotNeedsaPilot_Trigger, false, false);
}
bool auto_libVLSK_gf_PlayVORobotNeedsaPilot_TriggerFunc (bool testConds, bool runActions) {
int lp_robotTeam = auto_libVLSK_gf_PlayVORobotNeedsaPilot_lp_robotTeam;
// Automatic Variable Declarations
// Implementation
if ((libGame_gv_gameOver == true)) {
return true;
}
libVLSK_gf_ResetAllVOUserData();
UserDataSetInt("MapVOEvent", "Volskaya - Pilot Needed", "Value", 1, 1);
ConversationDataRun("VolskayaIndustriesVO", libGame_gf_PlayersOnTeamHeroes(lp_robotTeam, false), c_conversationSkipNone, false);
return true;
}
trigger auto_libVLSK_gf_PlayVORobotNeedsaGunner_Trigger = null;
int auto_libVLSK_gf_PlayVORobotNeedsaGunner_lp_robotTeam;
void libVLSK_gf_PlayVORobotNeedsaGunner (int lp_robotTeam) {
auto_libVLSK_gf_PlayVORobotNeedsaGunner_lp_robotTeam = lp_robotTeam;
if (auto_libVLSK_gf_PlayVORobotNeedsaGunner_Trigger == null) {
auto_libVLSK_gf_PlayVORobotNeedsaGunner_Trigger = TriggerCreate("auto_libVLSK_gf_PlayVORobotNeedsaGunner_TriggerFunc");
}
TriggerExecute(auto_libVLSK_gf_PlayVORobotNeedsaGunner_Trigger, false, false);
}
bool auto_libVLSK_gf_PlayVORobotNeedsaGunner_TriggerFunc (bool testConds, bool runActions) {
int lp_robotTeam = auto_libVLSK_gf_PlayVORobotNeedsaGunner_lp_robotTeam;
// Automatic Variable Declarations
// Implementation
if ((libGame_gv_gameOver == true)) {
return true;
}
libVLSK_gf_ResetAllVOUserData();
UserDataSetInt("MapVOEvent", "Volskaya - Gunner Needed", "Value", 1, 1);
ConversationDataRun("VolskayaIndustriesVO", libGame_gf_PlayersOnTeamHeroes(lp_robotTeam, false), c_conversationSkipNone, false);
return true;
}
trigger auto_libVLSK_gf_PlayVORobotDestroyed_Trigger = null;
void libVLSK_gf_PlayVORobotDestroyed () {
if (auto_libVLSK_gf_PlayVORobotDestroyed_Trigger == null) {
auto_libVLSK_gf_PlayVORobotDestroyed_Trigger = TriggerCreate("auto_libVLSK_gf_PlayVORobotDestroyed_TriggerFunc");
}
TriggerExecute(auto_libVLSK_gf_PlayVORobotDestroyed_Trigger, false, false);
}
bool auto_libVLSK_gf_PlayVORobotDestroyed_TriggerFunc (bool testConds, bool runActions) {
// Automatic Variable Declarations
// Implementation
Wait(0.5, c_timeGame);
if ((libGame_gv_gameOver == true)) {
return true;
}
libVLSK_gf_ResetAllVOUserData();
UserDataSetInt("MapVOEvent", "Volskaya - Mech Destroyed", "Value", 1, 1);
ConversationDataRun("VolskayaIndustriesVO", PlayerGroupAll(), c_conversationSkipNone, false);
return true;
}
trigger auto_libVLSK_gf_PlayVORobotTimedOut_Trigger = null;
void libVLSK_gf_PlayVORobotTimedOut () {
if (auto_libVLSK_gf_PlayVORobotTimedOut_Trigger == null) {
auto_libVLSK_gf_PlayVORobotTimedOut_Trigger = TriggerCreate("auto_libVLSK_gf_PlayVORobotTimedOut_TriggerFunc");
}
TriggerExecute(auto_libVLSK_gf_PlayVORobotTimedOut_Trigger, false, false);
}
bool auto_libVLSK_gf_PlayVORobotTimedOut_TriggerFunc (bool testConds, bool runActions) {
// Automatic Variable Declarations
// Implementation
Wait(0.5, c_timeGame);
if ((libGame_gv_gameOver == true)) {
return true;
}
libVLSK_gf_ResetAllVOUserData();
UserDataSetInt("MapVOEvent", "Volskaya - Mech Expired", "Value", 1, 1);
ConversationDataRun("VolskayaIndustriesVO", PlayerGroupAll(), c_conversationSkipNone, false);
return true;
}
void libVLSK_gf_ResetAllVOUserData () {
// Automatic Variable Declarations
// Implementation
UserDataResetType("MapVOEvent");
ConversationDataLineResetPlayers("VolskayaIndustriesVO", ("Left"));
ConversationDataLineResetPlayers("VolskayaIndustriesVO", ("Right"));
ConversationDataLineResetPlayers("VolskayaIndustriesVO", ("Observer"));
}
// Triggers
//--------------------------------------------------------------------------------------------------
// Trigger: Volskaya Initialize Map MVP Announcer Sounds
//--------------------------------------------------------------------------------------------------
bool libVLSK_gt_VolskayaInitializeMapMVPAnnouncerSounds_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_player;
// Automatic Variable Declarations
int auto8ADB8D72_ae;
// Variable Initialization
// Actions
if (!runActions) {
return true;
}
auto8ADB8D72_ae = libCore_gv_bALMaxEnginePlayerCount;
lv_player = 1;
for ( ; lv_player <= auto8ADB8D72_ae ; lv_player += 1 ) {
libGame_gv_players[lv_player].lv_lootContent.lv_loot_AnnouncerPack.lv_announcerVOLines[libCore_ge_AnnouncerVOEvents_MVP].lv_soundLink = "VolskayaA_MVP";
libGame_gv_players[lv_player].lv_lootContent.lv_loot_AnnouncerPack.lv_announcerVOLines[libCore_ge_AnnouncerVOEvents_MVP].lv_playAtGameEnd = true;
libGame_gv_players[lv_player].lv_lootContent.lv_loot_AnnouncerPack.lv_announcerVOLines[libCore_ge_AnnouncerVOEvents_MVPVoteEpic].lv_soundLink = "VolskayaA_Epic";
libGame_gv_players[lv_player].lv_lootContent.lv_loot_AnnouncerPack.lv_announcerVOLines[libCore_ge_AnnouncerVOEvents_MVPVoteEpic].lv_playAtGameEnd = true;
libGame_gv_players[lv_player].lv_lootContent.lv_loot_AnnouncerPack.lv_announcerVOLines[libCore_ge_AnnouncerVOEvents_MVPVoteLegendary].lv_soundLink = "VolskayaA_Legendary";
libGame_gv_players[lv_player].lv_lootContent.lv_loot_AnnouncerPack.lv_announcerVOLines[libCore_ge_AnnouncerVOEvents_MVPVoteLegendary].lv_playAtGameEnd = true;
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libVLSK_gt_VolskayaInitializeMapMVPAnnouncerSounds_Init () {
libVLSK_gt_VolskayaInitializeMapMVPAnnouncerSounds = TriggerCreate("libVLSK_gt_VolskayaInitializeMapMVPAnnouncerSounds_Func");
libCore_gf_IncludeModInitialization(libVLSK_gt_VolskayaInitializeMapMVPAnnouncerSounds);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Map Mechanic Initialization
//--------------------------------------------------------------------------------------------------
bool libVLSK_gt_MapMechanicInitialization_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_i;
// Automatic Variable Declarations
// Variable Initialization
// Actions
if (!runActions) {
return true;
}
libUIUI_gf_PingCreateNewPingTarget("ControlPointMinimapIconA", false, StringExternal("Param/Value/lib_VLSK_577D5DA4"), StringExternal("Param/Value/lib_VLSK_073EC6D4"), StringExternal("Param/Value/lib_VLSK_ACE676F3"), SoundLink("UI_Game_Ping_Help", -1), SoundLink("UI_Game_Ping_Help", -1));
libUIUI_gf_PingCreateNewPingTarget("ControlPointMinimapIconB", false, StringExternal("Param/Value/lib_VLSK_2F4CE889"), StringExternal("Param/Value/lib_VLSK_8DD2D0A5"), StringExternal("Param/Value/lib_VLSK_99271660"), SoundLink("UI_Game_Ping_Help", -1), SoundLink("UI_Game_Ping_Help", -1));
libUIUI_gf_PingCreateNewPingTarget("ControlPointMinimapIconC", false, StringExternal("Param/Value/lib_VLSK_320D9C72"), StringExternal("Param/Value/lib_VLSK_B38ABA75"), StringExternal("Param/Value/lib_VLSK_F5DA3E5D"), SoundLink("UI_Game_Ping_Help", -1), SoundLink("UI_Game_Ping_Help", -1));
return true;
}
//--------------------------------------------------------------------------------------------------
void libVLSK_gt_MapMechanicInitialization_Init () {
libVLSK_gt_MapMechanicInitialization = TriggerCreate("libVLSK_gt_MapMechanicInitialization_Func");
TriggerAddEventMapInit(libVLSK_gt_MapMechanicInitialization);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Include Mod Initialization
//--------------------------------------------------------------------------------------------------
bool libVLSK_gt_IncludeModInitialization_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
// Actions
if (!runActions) {
return true;
}
libVLSK_gf_InitializeVolskayaUI();
libGame_gf_SendMapSpecificAwardInitializeEventwithUserData(null, "Generic Instance");
return true;
}
//--------------------------------------------------------------------------------------------------
void libVLSK_gt_IncludeModInitialization_Init () {
libVLSK_gt_IncludeModInitialization = TriggerCreate("libVLSK_gt_IncludeModInitialization_Func");
libCore_gf_IncludeModInitialization(libVLSK_gt_IncludeModInitialization);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Capture Point Cooldown Timer Expires
//--------------------------------------------------------------------------------------------------
bool libVLSK_gt_CapturePointCooldownTimerExpires_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
// Actions
if (!runActions) {
return true;
}
TimerStart(libVLSK_gv_capturePointWarningTimer, libVLSK_gv_warningTimerDuration, false, c_timeGame);
libVLSK_gf_SendEventVolskayaPointWarningCreated(libVLSK_gv_capturePoints[libVLSK_gv_currentCapturePoint].lv_region);
libVLSK_gf_PlayVOControlPointWarning();
libVLSK_gf_ShowCapturePointWarningSlideoutWithPing(libVLSK_gv_currentCapturePoint);
return true;
}
//--------------------------------------------------------------------------------------------------
void libVLSK_gt_CapturePointCooldownTimerExpires_Init () {
libVLSK_gt_CapturePointCooldownTimerExpires = TriggerCreate("libVLSK_gt_CapturePointCooldownTimerExpires_Func");
TriggerAddEventTimer(libVLSK_gt_CapturePointCooldownTimerExpires, libVLSK_gv_capturePointCooldownTimer);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Capture Point Warning Timer Expires
//--------------------------------------------------------------------------------------------------
bool libVLSK_gt_CapturePointWarningTimerExpires_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
// Actions
if (!runActions) {
return true;
}
libVLSK_gf_PlayVOControlPointEnabled();
libVLSK_gf_EnableDisableCapturePoint(libVLSK_gv_currentCapturePoint, true);
return true;
}
//--------------------------------------------------------------------------------------------------
void libVLSK_gt_CapturePointWarningTimerExpires_Init () {
libVLSK_gt_CapturePointWarningTimerExpires = TriggerCreate("libVLSK_gt_CapturePointWarningTimerExpires_Func");
TriggerAddEventTimer(libVLSK_gt_CapturePointWarningTimerExpires, libVLSK_gv_capturePointWarningTimer);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Gate Open Timer Expires
//--------------------------------------------------------------------------------------------------
bool libVLSK_gt_GateOpenTimerExpires_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
// Actions
if (!runActions) {
return true;
}
TriggerEnable(TriggerGetCurrent(), false);
if ((libMapM_gv_mMMapMechanicDisabled == false)) {
libVLSK_gv_currentCapturePoint = libVLSK_gf_GetNextCapturePointIndex();
TimerStart(libVLSK_gv_mMVolskayaObjectivePreviewTimer, libVLSK_gv_mMVolskayaObjectivePreviewDelay_C, false, c_timeGame);
}
if ((libMapM_gv_mMMapMechanicDisabled == false)) {
TimerStart(libVLSK_gv_capturePointCooldownTimer, libVLSK_gv_mechanicInitialSpawnTimerDuration_C, false, c_timeGame);
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libVLSK_gt_GateOpenTimerExpires_Init () {
libVLSK_gt_GateOpenTimerExpires = TriggerCreate("libVLSK_gt_GateOpenTimerExpires_Func");
TriggerAddEventTimer(libVLSK_gt_GateOpenTimerExpires, libGame_gv_openTheGatesTimer);
}
//--------------------------------------------------------------------------------------------------
// Trigger: MM Volskaya - Objective Preview Timer Expires
//--------------------------------------------------------------------------------------------------
bool libVLSK_gt_MMVolskayaObjectivePreviewTimerExpires_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
// Actions
if (!runActions) {
return true;
}
libVLSK_gf_CreateCapturePointPreview(libVLSK_gv_currentCapturePoint);
return true;
}
//--------------------------------------------------------------------------------------------------
void libVLSK_gt_MMVolskayaObjectivePreviewTimerExpires_Init () {
libVLSK_gt_MMVolskayaObjectivePreviewTimerExpires = TriggerCreate("libVLSK_gt_MMVolskayaObjectivePreviewTimerExpires_Func");
TriggerAddEventTimer(libVLSK_gt_MMVolskayaObjectivePreviewTimerExpires, libVLSK_gv_mMVolskayaObjectivePreviewTimer);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Giant Robot Dies
//--------------------------------------------------------------------------------------------------
bool libVLSK_gt_GiantRobotDies_Func (bool testConds, bool runActions) {
// Variable Declarations
point lv_deathPosition;
// Automatic Variable Declarations
// Variable Initialization
lv_deathPosition = UnitGetPosition(EventUnit());
// Actions
if (!runActions) {
return true;
}
libVLSK_gf_SendEventVolskayaGiantRobotDies(lv_deathPosition, libGame_gf_TeamNumberOfPlayer(UnitGetOwner(EventUnit())));
libMapM_gf_JungleStopHibernateCamps();
TriggerEnable(libVLSK_gt_PilotEntersRobotDropBanner, false);
TriggerEnable(libVLSK_gt_GunnerEntersRobotDropBanner, false);
TriggerEnable(libVLSK_gt_PilotNeededTimerExpires, false);
TriggerEnable(libVLSK_gt_GunnerNeededTimerExpires, false);
TriggerEnable(libVLSK_gt_PilotEntersRobotStartGunnerReminderTimer, false);
TriggerEnable(libVLSK_gt_GunnerEntersRobotStopGunnerReminderTimer, false);
if ((UnitBehaviorDuration(EventUnit(), "VehicleDragonTimedLife") > 0.0)) {
libVLSK_gf_PlayVORobotDestroyed();
}
else {
libVLSK_gf_PlayVORobotTimedOut();
}
if ((libMapM_gv_mMMapMechanicDisabled == false)) {
libVLSK_gv_currentCapturePoint = libVLSK_gf_GetNextCapturePointIndex();
TimerStart(libVLSK_gv_mMVolskayaObjectivePreviewTimer, libVLSK_gv_mMVolskayaObjectivePreviewDelay_C, false, c_timeGame);
TimerStart(libVLSK_gv_capturePointCooldownTimer, libVLSK_gv_cooldownTimerDuration_C, false, c_timeGame);
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libVLSK_gt_GiantRobotDies_Init () {
libVLSK_gt_GiantRobotDies = TriggerCreate("libVLSK_gt_GiantRobotDies_Func");
}
//--------------------------------------------------------------------------------------------------
// Trigger: Pilot Enters Robot - Drop Banner
//--------------------------------------------------------------------------------------------------
bool libVLSK_gt_PilotEntersRobotDropBanner_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_triggeringPlayer;
// Automatic Variable Declarations
// Variable Initialization
lv_triggeringPlayer = UnitGetOwner(EventUnit());
// Conditions
if (testConds) {
if (!((UnitGetType(EventUnit()) == "VolskayaVehicle"))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
if ((libVLSK_gv_capturePoints[libVLSK_gv_currentCapturePoint].lv_pilotBannerSconce != null)) {
libGame_gf_DropLootBannerinSconce(libVLSK_gv_capturePoints[libVLSK_gv_currentCapturePoint].lv_pilotBannerSconce, libGame_gv_players[lv_triggeringPlayer].lv_lootContent.lv_loot_Banner.lv_bannerID, lv_triggeringPlayer, true);
}
TriggerEnable(TriggerGetCurrent(), false);
return true;
}
//--------------------------------------------------------------------------------------------------
void libVLSK_gt_PilotEntersRobotDropBanner_Init () {
libVLSK_gt_PilotEntersRobotDropBanner = TriggerCreate("libVLSK_gt_PilotEntersRobotDropBanner_Func");
TriggerEnable(libVLSK_gt_PilotEntersRobotDropBanner, false);
TriggerAddEventUnitBehaviorChange(libVLSK_gt_PilotEntersRobotDropBanner, null, "GenericVehicleBehaviorOccupied", c_unitBehaviorChangeCreate);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Gunner Enters Robot - Drop Banner
//--------------------------------------------------------------------------------------------------
bool libVLSK_gt_GunnerEntersRobotDropBanner_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_triggeringPlayer;
// Automatic Variable Declarations
// Variable Initialization
lv_triggeringPlayer = UnitGetOwner(EventUnit());
// Conditions
if (testConds) {
if (!((UnitGetType(EventUnit()) == "VolskayaVehicleGunner"))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
if ((libVLSK_gv_capturePoints[libVLSK_gv_currentCapturePoint].lv_gunnerBannerSconce != null)) {
libGame_gf_DropLootBannerinSconce(libVLSK_gv_capturePoints[libVLSK_gv_currentCapturePoint].lv_gunnerBannerSconce, libGame_gv_players[lv_triggeringPlayer].lv_lootContent.lv_loot_Banner.lv_bannerID, lv_triggeringPlayer, true);
}
TriggerEnable(TriggerGetCurrent(), false);
return true;
}
//--------------------------------------------------------------------------------------------------
void libVLSK_gt_GunnerEntersRobotDropBanner_Init () {
libVLSK_gt_GunnerEntersRobotDropBanner = TriggerCreate("libVLSK_gt_GunnerEntersRobotDropBanner_Func");
TriggerEnable(libVLSK_gt_GunnerEntersRobotDropBanner, false);
TriggerAddEventUnitBehaviorChange(libVLSK_gt_GunnerEntersRobotDropBanner, null, "GenericVehicleBehaviorOccupied", c_unitBehaviorChangeCreate);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Pilot Needed Timer Expires
//--------------------------------------------------------------------------------------------------
bool libVLSK_gt_PilotNeededTimerExpires_Func (bool testConds, bool runActions) {
// Variable Declarations
unit lv_robotUnit;
int lv_robotTeam;
int lv_ping;
timer lv_pingDurationTimer;
// Automatic Variable Declarations
// Variable Initialization
lv_robotUnit = UnitGroupUnit(UnitGroup("VolskayaVehicle", c_playerAny, RegionEntireMap(), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), 1);
lv_robotTeam = libGame_gf_TeamNumberOfPlayer(UnitGetOwner(lv_robotUnit));
lv_ping = c_invalidPingId;
lv_pingDurationTimer = TimerCreate();
// Actions
if (!runActions) {
return true;
}
TriggerEnable(TriggerGetCurrent(), false);
libVLSK_gf_PlayVORobotNeedsaPilot(lv_robotTeam);
PingCreateFromData(libGame_gf_PlayersOnTeamHeroes(lv_robotTeam, false), "StormAlert", UnitGetPosition(lv_robotUnit));
lv_ping = PingLastCreated();
PingSetUnit(lv_ping, lv_robotUnit);
TimerStart(lv_pingDurationTimer, 5.0, false, c_timeGame);
while ((UnitIsAlive(lv_robotUnit) == true) && (TimerGetRemaining(lv_pingDurationTimer) > 0.0)) {
Wait(0.0625, c_timeGame);
}
PingDestroy(lv_ping);
return true;
}
//--------------------------------------------------------------------------------------------------
void libVLSK_gt_PilotNeededTimerExpires_Init () {
libVLSK_gt_PilotNeededTimerExpires = TriggerCreate("libVLSK_gt_PilotNeededTimerExpires_Func");
TriggerEnable(libVLSK_gt_PilotNeededTimerExpires, false);
TriggerAddEventTimer(libVLSK_gt_PilotNeededTimerExpires, libVLSK_gv_pilotNeededTimer);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Gunner Needed Timer Expires
//--------------------------------------------------------------------------------------------------
bool libVLSK_gt_GunnerNeededTimerExpires_Func (bool testConds, bool runActions) {
// Variable Declarations
unit lv_robotUnit;
int lv_robotTeam;
int lv_ping;
timer lv_pingDurationTimer;
// Automatic Variable Declarations
// Variable Initialization
lv_robotUnit = UnitGroupUnit(UnitGroup("VolskayaVehicle", c_playerAny, RegionEntireMap(), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), 1);
lv_robotTeam = libGame_gf_TeamNumberOfPlayer(UnitGetOwner(lv_robotUnit));
lv_ping = c_invalidPingId;
lv_pingDurationTimer = TimerCreate();
// Actions
if (!runActions) {
return true;
}
TriggerEnable(TriggerGetCurrent(), false);
libVLSK_gf_PlayVORobotNeedsaGunner(libGame_gf_TeamNumberOfPlayer(UnitGetOwner(lv_robotUnit)));
PingCreateFromData(libGame_gf_PlayersOnTeamHeroes(lv_robotTeam, false), "StormAlert", UnitGetPosition(lv_robotUnit));
lv_ping = PingLastCreated();
PingSetUnit(lv_ping, lv_robotUnit);
TimerStart(lv_pingDurationTimer, 5.0, false, c_timeGame);
while ((UnitIsAlive(lv_robotUnit) == true) && (TimerGetRemaining(lv_pingDurationTimer) > 0.0)) {
Wait(0.0625, c_timeGame);
}
PingDestroy(lv_ping);
return true;
}
//--------------------------------------------------------------------------------------------------
void libVLSK_gt_GunnerNeededTimerExpires_Init () {
libVLSK_gt_GunnerNeededTimerExpires = TriggerCreate("libVLSK_gt_GunnerNeededTimerExpires_Func");
TriggerEnable(libVLSK_gt_GunnerNeededTimerExpires, false);
TriggerAddEventTimer(libVLSK_gt_GunnerNeededTimerExpires, libVLSK_gv_gunnerNeededTimer);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Pilot Enters Robot - Start Gunner Reminder Timer
//--------------------------------------------------------------------------------------------------
bool libVLSK_gt_PilotEntersRobotStartGunnerReminderTimer_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
// Conditions
if (testConds) {
if (!((UnitGetType(EventUnit()) == "VolskayaVehicle"))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
libNtve_gf_StopTimer(libVLSK_gv_pilotNeededTimer);
TimerStart(libVLSK_gv_gunnerNeededTimer, 10.0, false, c_timeGame);
TriggerEnable(TriggerGetCurrent(), false);
return true;
}
//--------------------------------------------------------------------------------------------------
void libVLSK_gt_PilotEntersRobotStartGunnerReminderTimer_Init () {
libVLSK_gt_PilotEntersRobotStartGunnerReminderTimer = TriggerCreate("libVLSK_gt_PilotEntersRobotStartGunnerReminderTimer_Func");
TriggerEnable(libVLSK_gt_PilotEntersRobotStartGunnerReminderTimer, false);
TriggerAddEventUnitBehaviorChange(libVLSK_gt_PilotEntersRobotStartGunnerReminderTimer, null, "GenericVehicleBehaviorOccupied", c_unitBehaviorChangeCreate);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Gunner Enters Robot - Stop Gunner Reminder Timer
//--------------------------------------------------------------------------------------------------
bool libVLSK_gt_GunnerEntersRobotStopGunnerReminderTimer_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
// Conditions
if (testConds) {
if (!((UnitGetType(EventUnit()) == "VolskayaVehicleGunner"))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
libNtve_gf_StopTimer(libVLSK_gv_gunnerNeededTimer);
TriggerEnable(TriggerGetCurrent(), false);
return true;
}
//--------------------------------------------------------------------------------------------------
void libVLSK_gt_GunnerEntersRobotStopGunnerReminderTimer_Init () {
libVLSK_gt_GunnerEntersRobotStopGunnerReminderTimer = TriggerCreate("libVLSK_gt_GunnerEntersRobotStopGunnerReminderTimer_Func");
TriggerEnable(libVLSK_gt_GunnerEntersRobotStopGunnerReminderTimer, false);
TriggerAddEventUnitBehaviorChange(libVLSK_gt_GunnerEntersRobotStopGunnerReminderTimer, null, "GenericVehicleBehaviorOccupied", c_unitBehaviorChangeCreate);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Control Point Enabled
//--------------------------------------------------------------------------------------------------
bool libVLSK_gt_ControlPointEnabled_Func (bool testConds, bool runActions) {
// Variable Declarations
point lv_centerOfRegion;
// Automatic Variable Declarations
// Variable Initialization
lv_centerOfRegion = RegionGetCenter(libVLSK_gf_VolskayaPointEnabledRegion());
// Conditions
if (testConds) {
if (!((libGame_gv_gameOver == false))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
libNtve_gf_SendActorMessageToGameRegion(RegionCircle(lv_centerOfRegion, libVLSK_gv_controlPointVisualsActorMsgRadius_C), "Signal EnablePoint");
return true;
}
//--------------------------------------------------------------------------------------------------
void libVLSK_gt_ControlPointEnabled_Init () {
libVLSK_gt_ControlPointEnabled = TriggerCreate("libVLSK_gt_ControlPointEnabled_Func");
libVLSK_gf_VolskayaPointEnabled(libVLSK_gt_ControlPointEnabled);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Control Point Ownership Changed
//--------------------------------------------------------------------------------------------------
bool libVLSK_gt_ControlPointOwnershipChanged_Func (bool testConds, bool runActions) {
// Variable Declarations
point lv_centerOfRegion;
int lv_newOwner;
// Automatic Variable Declarations
int autoA76ADC6E_val;
// Variable Initialization
lv_centerOfRegion = RegionGetCenter(libVLSK_gf_VolskayaPointOwnershipChangedRegion());
lv_newOwner = libVLSK_gf_VolskayaPointOwnershipChangedNewOwner();
// Conditions
if (testConds) {
if (!((libGame_gv_gameOver == false))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
autoA76ADC6E_val = lv_newOwner;
if (autoA76ADC6E_val == libCore_gv_cOMPUTER_Neutral) {
libNtve_gf_SendActorMessageToGameRegion(RegionCircle(lv_centerOfRegion, libVLSK_gv_controlPointVisualsActorMsgRadius_C), "Signal SetOwnerNeutral");
}
else if (autoA76ADC6E_val == libGame_gv_teamOrderIndex_C) {
libNtve_gf_SendActorMessageToGameRegion(RegionCircle(lv_centerOfRegion, libVLSK_gv_controlPointVisualsActorMsgRadius_C), "Signal SetOwnerOrder");
}
else if (autoA76ADC6E_val == libGame_gv_teamChaosIndex_C) {
libNtve_gf_SendActorMessageToGameRegion(RegionCircle(lv_centerOfRegion, libVLSK_gv_controlPointVisualsActorMsgRadius_C), "Signal SetOwnerChaos");
}
else {
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libVLSK_gt_ControlPointOwnershipChanged_Init () {
libVLSK_gt_ControlPointOwnershipChanged = TriggerCreate("libVLSK_gt_ControlPointOwnershipChanged_Func");
libVLSK_gf_VolskayaPointOwnershipChanged(libVLSK_gt_ControlPointOwnershipChanged);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Control Point Completed
//--------------------------------------------------------------------------------------------------
bool libVLSK_gt_ControlPointCompleted_Func (bool testConds, bool runActions) {
// Variable Declarations
point lv_centerOfRegion;
// Automatic Variable Declarations
// Variable Initialization
lv_centerOfRegion = RegionGetCenter(libVLSK_gf_VolskayaPointCompletedRegion());
// Conditions
if (testConds) {
if (!((libGame_gv_gameOver == false))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
libNtve_gf_SendActorMessageToGameRegion(RegionCircle(lv_centerOfRegion, libVLSK_gv_controlPointVisualsActorMsgRadius_C), "Signal DisablePoint");
return true;
}
//--------------------------------------------------------------------------------------------------
void libVLSK_gt_ControlPointCompleted_Init () {
libVLSK_gt_ControlPointCompleted = TriggerCreate("libVLSK_gt_ControlPointCompleted_Func");
libVLSK_gf_VolskayaPointCompleted(libVLSK_gt_ControlPointCompleted);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Vehicle Entered
//--------------------------------------------------------------------------------------------------
bool libVLSK_gt_VehicleEntered_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
// Actions
if (!runActions) {
return true;
}
if ((UnitGetType(libGame_gf_UseVehicleVehicleUnit()) == "VolskayaVehicle")) {
libVLSK_gf_SetPilotPortrait(libGame_gf_UseVehiclePassengerHero());
}
else {
if ((UnitGetType(libGame_gf_UseVehicleVehicleUnit()) == "VolskayaVehicleGunner")) {
UnitCreateEffectUnit(libMapM_gv_vehicle[libMapM_gf_GetVehicleIndexOfUnit(libGame_gf_UseVehicleVehicleUnit())].lv_unit_LinkedVehicle, "AttachedVehicle_AddTrackedUnit", libGame_gf_UseVehiclePassengerHero());
libVLSK_gf_SetGunnerPortrait(libGame_gf_UseVehiclePassengerHero());
}
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libVLSK_gt_VehicleEntered_Init () {
libVLSK_gt_VehicleEntered = TriggerCreate("libVLSK_gt_VehicleEntered_Func");
libGame_gf_HeroEnteredVehicleInstant(libVLSK_gt_VehicleEntered);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Vehicle Swapped
//--------------------------------------------------------------------------------------------------
bool libVLSK_gt_VehicleSwapped_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
// Actions
if (!runActions) {
return true;
}
if ((UnitGetType(libGame_gf_VehicleSwappedNewVehicle()) == "VolskayaVehicle")) {
libVLSK_gf_SetPilotPortrait(libGame_gf_VehicleSwappedPassengerHero());
libVLSK_gf_SetGunnerPortrait(null);
}
else {
if ((UnitGetType(libGame_gf_VehicleSwappedNewVehicle()) == "VolskayaVehicleGunner")) {
UnitCreateEffectUnit(libGame_gf_VehicleSwappedOriginVehicle(), "AttachedVehicle_AddTrackedUnit", libGame_gf_VehicleSwappedPassengerHero());
libVLSK_gf_SetGunnerPortrait(libGame_gf_VehicleSwappedPassengerHero());
libVLSK_gf_SetPilotPortrait(null);
}
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libVLSK_gt_VehicleSwapped_Init () {
libVLSK_gt_VehicleSwapped = TriggerCreate("libVLSK_gt_VehicleSwapped_Func");
libGame_gf_HeroSwappedVehicleInstant(libVLSK_gt_VehicleSwapped);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Vehicle Abandoned
//--------------------------------------------------------------------------------------------------
bool libVLSK_gt_VehicleAbandoned_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
// Actions
if (!runActions) {
return true;
}
if ((UnitGetType(libGame_gf_VehicleAbandonedVehicle()) == "VolskayaVehicle")) {
libVLSK_gf_SetPilotPortrait(null);
}
else {
if ((UnitGetType(libGame_gf_VehicleAbandonedVehicle()) == "VolskayaVehicleGunner")) {
UnitCreateEffectUnit(libMapM_gv_vehicle[libMapM_gf_GetVehicleIndexOfUnit(libGame_gf_VehicleAbandonedVehicle())].lv_unit_LinkedVehicle, "AttachedVehicle_RemoveTrackedUnit", libGame_gf_VehicleAbandonedPassengerHero());
libVLSK_gf_SetGunnerPortrait(null);
}
}
return true;
}
//--------------------------------------------------------------------------------------------------
void libVLSK_gt_VehicleAbandoned_Init () {
libVLSK_gt_VehicleAbandoned = TriggerCreate("libVLSK_gt_VehicleAbandoned_Func");
libGame_gf_VehicleAbandonedInstant(libVLSK_gt_VehicleAbandoned);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Enable Next Capture Point
//--------------------------------------------------------------------------------------------------
bool libVLSK_gt_EnableNextCapturePoint_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
// Conditions
if (testConds) {
if (!((GameCheatsEnabled(c_gameCheatCategoryDevelopment) == true))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
TimerStart(libVLSK_gv_capturePointCooldownTimer, 0.0625, false, c_timeGame);
return true;
}
//--------------------------------------------------------------------------------------------------
void libVLSK_gt_EnableNextCapturePoint_Init () {
libVLSK_gt_EnableNextCapturePoint = TriggerCreate("libVLSK_gt_EnableNextCapturePoint_Func");
TriggerAddEventChatMessage(libVLSK_gt_EnableNextCapturePoint, c_playerAny, "eventstart", true);
TriggerAddEventChatMessage(libVLSK_gt_EnableNextCapturePoint, c_playerAny, "nextpoint", true);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Kill Robot
//--------------------------------------------------------------------------------------------------
bool libVLSK_gt_KillRobot_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
// Conditions
if (testConds) {
if (!((GameCheatsEnabled(c_gameCheatCategoryDevelopment) == true))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
UnitKill(libVLSK_gv_giantRobotUnit);
return true;
}
//--------------------------------------------------------------------------------------------------
void libVLSK_gt_KillRobot_Init () {
libVLSK_gt_KillRobot = TriggerCreate("libVLSK_gt_KillRobot_Func");
TriggerAddEventChatMessage(libVLSK_gt_KillRobot, c_playerAny, "killrobot", true);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Show Overtime
//--------------------------------------------------------------------------------------------------
bool libVLSK_gt_ShowOvertime_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_i;
// Automatic Variable Declarations
const int autoCB5C6AAB_ae = 0;
const int autoCB5C6AAB_ai = -1;
// Variable Initialization
// Conditions
if (testConds) {
if (!((GameCheatsEnabled(c_gameCheatCategoryDevelopment) == true))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
libVLSK_gf_EnableDisableOvertimeBar(true);
lv_i = 100;
for ( ; ( (autoCB5C6AAB_ai >= 0 && lv_i <= autoCB5C6AAB_ae) || (autoCB5C6AAB_ai < 0 && lv_i >= autoCB5C6AAB_ae) ) ; lv_i += autoCB5C6AAB_ai ) {
libNtve_gf_SetDialogItemCurrentValue(libVLSK_gv_volskayaUI.lv_overtimeBar_ProgressBar, (lv_i / 100.0), PlayerGroupAll());
Wait(0.125, c_timeGame);
}
libVLSK_gf_EnableDisableOvertimeBar(false);
return true;
}
//--------------------------------------------------------------------------------------------------
void libVLSK_gt_ShowOvertime_Init () {
libVLSK_gt_ShowOvertime = TriggerCreate("libVLSK_gt_ShowOvertime_Func");
TriggerAddEventChatMessage(libVLSK_gt_ShowOvertime, c_playerAny, "overtime", true);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Prep for Robot Testing
//--------------------------------------------------------------------------------------------------
bool libVLSK_gt_PrepforRobotTesting_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_team;
int lv_i;
// Automatic Variable Declarations
const int auto761D8D73_ae = libCore_gv_bALMaxPlayers;
const int auto761D8D73_ai = 1;
const int autoF15E0D4D_ae = 3;
const int autoF15E0D4D_ai = 1;
// Variable Initialization
lv_team = StringToInt(StringSub(EventChatMessage(false), 11, 11));
// Conditions
if (testConds) {
if (!((GameCheatsEnabled(c_gameCheatCategoryDevelopment) == true))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
TextExpressionSetToken("Param/Expression/lib_VLSK_A04AC8EE", "A", IntToText(lv_team));
TriggerDebugOutput(1, TextExpressionAssemble("Param/Expression/lib_VLSK_A04AC8EE"), true);
lv_i = 1;
for ( ; ( (auto761D8D73_ai >= 0 && lv_i <= auto761D8D73_ae) || (auto761D8D73_ai < 0 && lv_i >= auto761D8D73_ae) ) ; lv_i += auto761D8D73_ai ) {
if (((PlayerType(lv_i) == c_playerTypeUser) || (PlayerType(lv_i) == c_playerTypeComputer))) {
libUIUI_gf_UIDebugPanelSpawnOrSwapHeroForPlayer(libCore_gf_GetIndexFromHero(libGame_gv_players[lv_i].lv_heroData.lv_heroCatalogLink), libGame_gv_players[lv_i].lv_selectedSkin, libGame_gv_players[lv_i].lv_selectedMount, libCore_gf_GetTotalXPForLevel(8), lv_i, lv_i);
}
}
TimerPause(libVLSK_gv_capturePointCooldownTimer, true);
TimerPause(libVLSK_gv_capturePointWarningTimer, true);
lv_i = 1;
for ( ; ( (autoF15E0D4D_ai >= 0 && lv_i <= autoF15E0D4D_ae) || (autoF15E0D4D_ai < 0 && lv_i >= autoF15E0D4D_ae) ) ; lv_i += autoF15E0D4D_ai ) {
if ((libVLSK_gv_capturePoints[lv_i].lv_isActive == true)) {
libVLSK_gf_EnableDisableCapturePoint(lv_i, false);
}
}
libVLSK_gf_AwardGiantRobottoTeam(lv_team, libVLSK_gv_capturePoints[1].lv_robotSpawnPoint);
libNtve_gf_SetUpgradeLevelForPlayer(libGame_gf_ComputerPlayerInTeam(lv_team), "VolskayaVehicleUpgrade", 8);
UnitSetPosition(libVLSK_gv_giantRobotUnit, PointWithOffset(UnitGetPosition(libGame_gv_teams[lv_team].lv_core), 0.0, 10.0), false);
return true;
}
//--------------------------------------------------------------------------------------------------
void libVLSK_gt_PrepforRobotTesting_Init () {
libVLSK_gt_PrepforRobotTesting = TriggerCreate("libVLSK_gt_PrepforRobotTesting_Func");
TriggerAddEventChatMessage(libVLSK_gt_PrepforRobotTesting, c_playerAny, "preprobot", false);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Set Portrait Icon - Pilot
//--------------------------------------------------------------------------------------------------
bool libVLSK_gt_SetPortraitIconPilot_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
// Conditions
if (testConds) {
if (!((GameCheatsEnabled(c_gameCheatCategoryDevelopment) == true))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
libVLSK_gf_SetPilotPortrait(UnitGroupUnit(UnitGroupSelected(EventPlayer()), 1));
return true;
}
//--------------------------------------------------------------------------------------------------
void libVLSK_gt_SetPortraitIconPilot_Init () {
libVLSK_gt_SetPortraitIconPilot = TriggerCreate("libVLSK_gt_SetPortraitIconPilot_Func");
TriggerAddEventChatMessage(libVLSK_gt_SetPortraitIconPilot, c_playerAny, "-gunnericon", true);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Set Portrait Icon - Gunner
//--------------------------------------------------------------------------------------------------
bool libVLSK_gt_SetPortraitIconGunner_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
// Conditions
if (testConds) {
if (!((GameCheatsEnabled(c_gameCheatCategoryDevelopment) == true))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
libVLSK_gf_SetGunnerPortrait(UnitGroupUnit(UnitGroupSelected(EventPlayer()), 1));
return true;
}
//--------------------------------------------------------------------------------------------------
void libVLSK_gt_SetPortraitIconGunner_Init () {
libVLSK_gt_SetPortraitIconGunner = TriggerCreate("libVLSK_gt_SetPortraitIconGunner_Func");
TriggerAddEventChatMessage(libVLSK_gt_SetPortraitIconGunner, c_playerAny, "-piloticon", true);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Play Death Jitter
//--------------------------------------------------------------------------------------------------
bool libVLSK_gt_PlayDeathJitter_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
// Conditions
if (testConds) {
if (!((GameCheatsEnabled(c_gameCheatCategoryDevelopment) == true))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
DialogControlSetVisible(libVLSK_gv_volskayaUI.lv_robot_Container, PlayerGroupAll(), true);
Wait(2.0, c_timeGame);
DialogControlSendAnimationEvent(libVLSK_gv_volskayaUI.lv_robot_DeathIcon1, PlayerGroupAll(), "PlayDeathJitter");
DialogControlSendAnimationEvent(libVLSK_gv_volskayaUI.lv_robot_DeathIcon2, PlayerGroupAll(), "PlayDeathJitter");
DialogControlSendAnimationEvent(libVLSK_gv_volskayaUI.lv_robot_DeathIcon3, PlayerGroupAll(), "PlayDeathJitter");
DialogControlSendAnimationEvent(libVLSK_gv_volskayaUI.lv_robot_RobotIcon, PlayerGroupAll(), "PlayDeathJitter");
return true;
}
//--------------------------------------------------------------------------------------------------
void libVLSK_gt_PlayDeathJitter_Init () {
libVLSK_gt_PlayDeathJitter = TriggerCreate("libVLSK_gt_PlayDeathJitter_Func");
TriggerAddEventChatMessage(libVLSK_gt_PlayDeathJitter, c_playerAny, "jitter", true);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Play Slideout
//--------------------------------------------------------------------------------------------------
bool libVLSK_gt_PlaySlideout_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
// Conditions
if (testConds) {
if (!((GameCheatsEnabled(c_gameCheatCategoryDevelopment) == true))) {
return false;
}
}
// Actions
if (!runActions) {
return true;
}
DialogControlSendAnimationEvent(libVLSK_gv_volskayaUI.lv_robot_Container, PlayerGroupAll(), "PlaySlideOut");
return true;
}
//--------------------------------------------------------------------------------------------------
void libVLSK_gt_PlaySlideout_Init () {
libVLSK_gt_PlaySlideout = TriggerCreate("libVLSK_gt_PlaySlideout_Func");
TriggerAddEventChatMessage(libVLSK_gt_PlaySlideout, c_playerAny, "slideout", true);
}
void libVLSK_InitTriggers () {
libVLSK_gt_VolskayaInitializeMapMVPAnnouncerSounds_Init();
libVLSK_gt_MapMechanicInitialization_Init();
libVLSK_gt_IncludeModInitialization_Init();
libVLSK_gt_CapturePointCooldownTimerExpires_Init();
libVLSK_gt_CapturePointWarningTimerExpires_Init();
libVLSK_gt_GateOpenTimerExpires_Init();
libVLSK_gt_MMVolskayaObjectivePreviewTimerExpires_Init();
libVLSK_gt_GiantRobotDies_Init();
libVLSK_gt_PilotEntersRobotDropBanner_Init();
libVLSK_gt_GunnerEntersRobotDropBanner_Init();
libVLSK_gt_PilotNeededTimerExpires_Init();
libVLSK_gt_GunnerNeededTimerExpires_Init();
libVLSK_gt_PilotEntersRobotStartGunnerReminderTimer_Init();
libVLSK_gt_GunnerEntersRobotStopGunnerReminderTimer_Init();
libVLSK_gt_ControlPointEnabled_Init();
libVLSK_gt_ControlPointOwnershipChanged_Init();
libVLSK_gt_ControlPointCompleted_Init();
libVLSK_gt_VehicleEntered_Init();
libVLSK_gt_VehicleSwapped_Init();
libVLSK_gt_VehicleAbandoned_Init();
libVLSK_gt_EnableNextCapturePoint_Init();
libVLSK_gt_KillRobot_Init();
libVLSK_gt_ShowOvertime_Init();
libVLSK_gt_PrepforRobotTesting_Init();
libVLSK_gt_SetPortraitIconPilot_Init();
libVLSK_gt_SetPortraitIconGunner_Init();
libVLSK_gt_PlayDeathJitter_Init();
libVLSK_gt_PlaySlideout_Init();
}
//--------------------------------------------------------------------------------------------------
// Library Initialization
//--------------------------------------------------------------------------------------------------
bool libVLSK_InitLib_completed = false;
void libVLSK_InitLib () {
if (libVLSK_InitLib_completed) {
return;
}
libVLSK_InitLib_completed = true;
libVLSK_InitLibraries();
libVLSK_InitVariables();
libVLSK_InitTriggers();
}