7 [
Attribute(
"", UIWidgets.ResourceNamePicker,
"",
"conf")]
8 ResourceName m_sStagesConfigAdvanced;
13 protected static const int TARGETS_SEARCH_DISTANCE = 1500;
14 protected static const int INVALID_STANCE = -1;
15 protected static const vector BACK_DOOR_OFFSET = { 0, -0.7, 0 };
16 protected static float WAYPOINT_FADE_THRESHOLD = 20;
17 protected static float WAYPOINT_MINIMUM_OPACITY = 0.2;
18 protected static float WAYPOINT_DISTANCE_INDICATOR_FADE_START = 100;
19 protected static float WAYPOINT_DISTANCE_INDICATOR_FADE_END = 50;
20 protected static const float SPAWN_STAGE_DISTANCE = 10;
21 protected static const float FADE_DURATION = 1;
22 protected static const float FADE_SPEED = 0.4;
23 protected static const int NUMBER_OF_TUTORIALS = 10;
24 static string VEHICLE_MAINTENANCE_PREFAB =
"{543C31BC05F032B6}PrefabsEditable/Auto/Compositions/Slotted/SlotFlatSmall/E_VehicleMaintenance_S_US_01.et";
25 static string HELICOPTER_PREFAB =
"{70BAEEFC2D3FEE64}Prefabs/Vehicles/Helicopters/UH1H/UH1H.et";
26 static string HUMMER_PREFAB =
"{751AFEEA19DDFB04}Prefabs/Vehicles/Wheeled/M998/M998_covered_long_MERDC.et";
27 static string JEEP_PREFAB =
"{94DE32169691AC34}Prefabs/Vehicles/Wheeled/M151A2/M151A2_transport_MERDC.et";
28 static string TRUCK_PREFAB =
"{C8656AECF5DF41D9}Prefabs/Vehicles/Wheeled/M923A1/M923A1_repair_MERDC.et";
29 static string DRIVING_RANGE_PREFAB =
"{B6F5006CBD24E9A1}Prefabs/TutorialDrivingRange.et";
31 protected ref array<ref SCR_CampaignTutorialArlandStageInfo>
m_aStageInfos = {};
62 protected ResourceName
m_WaypointWidget =
"{B80E30D68492B2AE}UI/Imagesets/TutorialHud/TutorialHUD.imageset";
63 protected static ref ScriptInvoker m_OnStructureBuilt =
new ScriptInvoker();
81 widgeter.SetVisible(
false);
93 ResourceName voiceDataConfig =
m_ActiveConfig.GetVoiceOverDataConfig();
94 if (voiceDataConfig.IsEmpty())
109 SCR_MapMarkerManagerComponent mapMarkerManager = SCR_MapMarkerManagerComponent.Cast(
GetGame().
GetGameMode().FindComponent(SCR_MapMarkerManagerComponent));
110 if (!mapMarkerManager)
113 array <ref SCR_MapMarkerBase> markerArray = {};
114 markerArray = mapMarkerManager.GetStaticMarkers();
117 mapMarkerManager.RemoveStaticMarker(markerArray[
index]);
129 if (!playerController)
132 SCR_AchievementsHandler handler = SCR_AchievementsHandler.Cast(playerController.FindComponent(SCR_AchievementsHandler));
179 SlotManagerComponent slotManager = SlotManagerComponent.Cast(
m_Helicopter.FindComponent(SlotManagerComponent));
187 rotor = slot.GetAttachedEntity();
188 SCR_RotorDamageManagerComponent rotorDmgComp = SCR_RotorDamageManagerComponent.Cast(rotor.FindComponent(SCR_RotorDamageManagerComponent));
199 VehicleControllerComponent_SA vehicleController = VehicleControllerComponent_SA.Cast(
m_Helicopter.FindComponent(VehicleControllerComponent_SA));
200 if (!vehicleController)
203 if (!vehicleController.GetEngineDrowned())
218 if (heliDamageManager)
225 SlotManagerComponent slotManager = SlotManagerComponent.Cast(
m_Helicopter.FindComponent(SlotManagerComponent));
232 IEntity rotor = slot.GetAttachedEntity();
236 SCR_RotorDamageManagerComponent rotorDmgComp = SCR_RotorDamageManagerComponent.Cast(rotor.FindComponent(SCR_RotorDamageManagerComponent));
288 VehicleControllerComponent_SA vehicleController = VehicleControllerComponent_SA.Cast(
m_Jeep.FindComponent(VehicleControllerComponent_SA));
289 if (!vehicleController || !vehicleController.GetEngineDrowned())
302 VehicleControllerComponent_SA vehicleController = VehicleControllerComponent_SA.Cast(
m_Hummer.FindComponent(VehicleControllerComponent_SA));
303 if (!vehicleController || !vehicleController.GetEngineDrowned())
316 VehicleControllerComponent_SA vehicleController = VehicleControllerComponent_SA.Cast(
m_RepairTruck.FindComponent(VehicleControllerComponent_SA));
317 if (!vehicleController || !vehicleController.GetEngineDrowned())
364 damageManager.GetOnDamageStateChanged().Remove(
OnHmwDamaged);
392 if (composition && composition.GetPrefabData().GetPrefabName() == prefabName)
423 SCR_MapDescriptorComponent descr = SCR_MapDescriptorComponent.Cast(ent.FindComponent(SCR_MapDescriptorComponent));
427 descr.Item().SetVisible(enable);
437 float cameraAngle = Math.RAD2DEG *
m_Player.GetCharacterController().GetInputContext().GetAimingAngles()[0];
438 return (cameraAngle > angle - range) && (cameraAngle < angle+range);
454 return Math.Round(angle);
475 if (modeEntity.GetModeType() !=
EEditorMode.BUILDING)
525 static ScriptInvoker GetOnStructureBuilt()
527 return m_OnStructureBuilt;
533 super.OnPlayerKilled(playerId, playerEntity, killerEntity);
536 PlayerController playerController =
GetGame().GetPlayerManager().GetPlayerController(playerId);
538 if (!playerController)
543 if (availableSpawnpoints.Count() < 2)
552 if (!SCR_HintManagerComponent.GetInstance())
555 if (!SCR_HintManagerComponent.GetInstance().IsShown())
572 m_Stage.OnInputDeviceChanged(switchedToKeyboard);
588 fade.FadeOutEffect(fadeOut, FADE_DURATION);
601 TimeAndWeatherManagerEntity tmwManager = world.GetTimeAndWeatherManager();
609 weatherName =
"Clear";
613 weatherName =
"Rainy";
617 weatherName =
"Cloudy";
621 weatherName =
"Overcast";
625 tmwManager.ForceWeatherTo(
m_ActiveConfig.ShouldWeatherLoop(), weatherName);
640 if(configs.GetStagesFromConfig() == config)
667 IEntity baseBeauregard =
GetGame().GetWorld().FindEntityByName(
"TownBaseBeauregard");
669 if (shootingRangePos)
670 GetGame().GetWorld().QueryEntitiesBySphere(shootingRangePos.GetOrigin(), TARGETS_SEARCH_DISTANCE,
CollectAllTargets,
null, EQueryEntitiesFlags.ALL);
673 GetGame().GetWorld().QueryEntitiesBySphere(baseBeauregard.GetOrigin(), 50,
CollectAllTargets,
null, EQueryEntitiesFlags.ALL);
680 IEntity mHQ =
GetGame().GetWorld().FindEntityByName(
"MobileHQ");
690 BaseRadioComponent radioComponent = BaseRadioComponent.Cast(mHQ.FindComponent(BaseRadioComponent));
692 if (radioComponent && radioComponent.TransceiversCount() > 0)
694 radioComponent.SetPower(
false);
695 radioComponent.GetTransceiver(0).SetFrequency(f.GetFactionRadioFrequency());
696 radioComponent.SetEncryptionKey(f.GetFactionRadioEncryptionKey());
699 SlotManagerComponent slotManager = SlotManagerComponent.Cast(mHQ.FindComponent(SlotManagerComponent));
704 array<EntitySlotInfo> slots = {};
705 slotManager.GetSlotInfos(slots);
712 IEntity truckBed = slot.GetAttachedEntity();
717 m_MobileAssemblyComponent = SCR_CampaignMobileAssemblyComponent.Cast(truckBed.FindComponent(SCR_CampaignMobileAssemblyComponent));
731 IEntity supplyTruck =
GetGame().GetWorld().FindEntityByName(
"BuildingSupplyTruck");
736 SlotManagerComponent slotManager = SlotManagerComponent.Cast(supplyTruck.FindComponent(SlotManagerComponent));
741 array<EntitySlotInfo> slots = {};
742 slotManager.GetSlotInfos(slots);
749 IEntity truckBed = slot.GetAttachedEntity();
756 if (suppliesComponent)
768 SpawnAsset(
"M16",
"{3E413771E1834D2F}Prefabs/Weapons/Rifles/M16/Rifle_M16A2.et");
769 SpawnAsset(
"M21",
"{81EB948E6414BD6F}Prefabs/Weapons/Rifles/M14/Rifle_M21_ARTII.et");
770 SpawnAsset(
"M249",
"{D2B48DEBEF38D7D7}Prefabs/Weapons/MachineGuns/M249/MG_M249.et");
778 SpawnAsset(
"Jeep",
"{5168FEA3054D6D15}Prefabs/Vehicles/Wheeled/M151A2/M151A2_M2HB_MERDC.et",
position);
787 SpawnAsset(
"SupplyTruck",
"{F37113A988304565}Prefabs/MP/Campaign/Assets/CampaignSupplyTruckWest.et",
position);
828 baseBeauregard.RefreshTasks();
835 baseMossHill.RefreshTasks();
838 SpawnAsset(
"Seizing_Car",
"{6B24D5AFD884D64C}Prefabs/Vehicles/Wheeled/M998/M998_MERDC.et");
839 SpawnAsset(
"Seizing_Seizing_Car_Pub",
"{6B24D5AFD884D64C}Prefabs/Vehicles/Wheeled/M998/M998_MERDC.et");
840 IEntity mhq =
SpawnAsset(
"MobileHQ",
"{9CB496688A3BCC3E}Prefabs/MP/Campaign/Assets/CampaignMobileAssemblyWest.et");
848 SCR_ResourceComponent resourceComp = SCR_ResourceComponent.FindResourceComponent(arsenalComp.GetOwner());
850 resourceComp.SetResourceTypeEnabled(
false);
856 BaseRadioComponent radioComponent = BaseRadioComponent.Cast(mhq.FindComponent(BaseRadioComponent));
857 if (radioComponent && radioComponent.TransceiversCount() > 0)
859 radioComponent.SetPower(
false);
860 radioComponent.GetTransceiver(0).SetFrequency(bluforFaction.GetFactionRadioFrequency());
861 radioComponent.SetEncryptionKey(bluforFaction.GetFactionRadioEncryptionKey());
864 SlotManagerComponent slotManager = SlotManagerComponent.Cast(mhq.FindComponent(SlotManagerComponent));
868 array<EntitySlotInfo> slots = {};
869 slotManager.GetSlotInfos(slots);
873 IEntity truckBed = slot.GetAttachedEntity();
878 SCR_CampaignMobileAssemblyComponent mobileAssemblyComponent = SCR_CampaignMobileAssemblyComponent.Cast(truckBed.FindComponent(SCR_CampaignMobileAssemblyComponent));
879 if (mobileAssemblyComponent)
902 IEntity ambulance =
SpawnAsset(
"Ambulance",
"{3B1EB924602C7A07}Prefabs/Vehicles/Wheeled/M998/M997_maxi_ambulance_MERDC.et");
907 if (!vehicleDamageManager)
918 IEntity victim =
SpawnAsset(
"Victim",
"{2F912ED6E399FF47}Prefabs/Characters/Factions/BLUFOR/US_Army/Character_US_Unarmed.et");
926 IEntity vehicle =
SpawnAsset(
"AccidentJeep",
"{86D830868F026D54}Prefabs/Vehicles/Wheeled/M151A2/M151A2_MERDC.et");
931 if (!compartmentAccess)
938 damageComp.AddParticularBleeding(
"LThigh");
939 damageComp.AddParticularBleeding(
"Chest");
940 damageComp.GetHitZoneByName(
"LThigh").SetHealth(0);
941 damageComp.GetHitZoneByName(
"Chest").SetHealth(0);
942 damageComp.ForceUnconsciousness();
943 damageComp.UpdateBloodClothes();
952 SCR_VehicleSpawnProtectionComponent spawnProtectionComponent = SCR_VehicleSpawnProtectionComponent.Cast(vehicle.FindComponent(SCR_VehicleSpawnProtectionComponent));
953 if (spawnProtectionComponent)
955 spawnProtectionComponent.SetProtectOnlyDriverSeat(
false);
956 spawnProtectionComponent.SetReasonText(
"#AR-Campaign_Action_BuildBlocked-UC");
957 spawnProtectionComponent.SetVehicleOwner(-2);
962 if (vehicleDamageManager)
963 vehicleDamageManager.EnableDamageHandling(
false);
979 SpawnAsset(
"Backpack",
"{4805E67E2AE30F8D}Prefabs/Items/Equipment/Backpacks/Backpack_Medical_M5.et");
1006 VehicleControllerComponent_SA vehicleController = VehicleControllerComponent_SA.Cast(
m_Jeep.FindComponent(VehicleControllerComponent_SA));
1007 if (vehicleController)
1031 SCR_DamageManagerComponent damageManagerBroken = SCR_DamageManagerComponent.GetDamageManager(
m_HummerRepairable);
1033 if (damageManagerBroken)
1035 HitZone engineHitZone = damageManagerBroken.GetHitZoneByName(
"Engine_01");
1040 vector transform[3];
1042 transform[1] = vector.Forward;
1043 transform[2] = vector.Up;
1046 if (engineDamageManager)
1051 engineDamageManager.HandleDamage(damageContext1);
1052 engineDamageManager.HandleDamage(damageContext2);
1073 VehicleControllerComponent_SA vehicleController = VehicleControllerComponent_SA.Cast(
m_RepairTruck.FindComponent(VehicleControllerComponent_SA));
1074 if (vehicleController)
1080 damageManager.GetOnDamageStateChanged().Insert(
OnHmwDamaged);
1090 gearbox.GetOnDamageStateChanged().Insert(
OnHmwDamaged);
1093 vehicleController = VehicleControllerComponent_SA.Cast(
m_Hummer.FindComponent(VehicleControllerComponent_SA));
1094 if (vehicleController)
1102 IEntity m16 =
SpawnAsset(
"M16",
"{3E413771E1834D2F}Prefabs/Weapons/Rifles/M16/Rifle_M16A2.et");
1106 IEntity m249 =
SpawnAsset(
"M249",
"{D2B48DEBEF38D7D7}Prefabs/Weapons/MachineGuns/M249/MG_M249.et");
1110 IEntity m21 =
SpawnAsset(
"M21",
"{81EB948E6414BD6F}Prefabs/Weapons/Rifles/M14/Rifle_M21_ARTII.et");
1130 IEntity victim =
GetGame().GetWorld().FindEntityByName(
"Victim");
1138 damageComp.GetResilienceHitZone().SetHealth(0);
1145 IEntity victim =
GetGame().GetWorld().FindEntityByName(
"Victim");
1153 damageComp.GetBloodHitZone().SetHealth(2000);
1160 IEntity victim =
GetGame().GetWorld().FindEntityByName(
"Victim");
1172 if (!
m_Player.IsInVehicle() || forcePlayerReset)
1204 spawnpoint =
GetGame().GetWorld().FindEntityByName(
string.Format(
"SpawnPos_%1", name));
1209 IEntity oldEntity =
GetGame().GetWorld().FindEntityByName(name);
1214 EntitySpawnParams
params = EntitySpawnParams();
1215 params.TransformMode = ETransformMode.WORLD;
1216 spawnpoint.GetWorldTransform(
params.Transform);
1217 Resource res = Resource.Load(
type);
1222 IEntity newEntity =
GetGame().SpawnEntityPrefab(res,
null,
params);
1223 newEntity.SetName(name);
1225 Vehicle veh = Vehicle.Cast(newEntity);
1229 vector pos = veh.GetOrigin();
1230 pos[1] = pos[1] + 1;
1232 Physics physicsComponent = veh.GetPhysics();
1234 if (physicsComponent)
1237 physicsComponent.SetVelocity(
"0 -1 0");
1251 if (!compartmentAccessComponent)
1257 if (compartmentAccessComponent.GetVehicle() != veh)
1334 CharacterControllerComponent comp = CharacterControllerComponent.Cast(
m_Player.FindComponent(CharacterControllerComponent));
1351 target.SetAutoResetTarget(
false);
1366 super.OnPlayerRegistered(playerId);
1368 BaseWorld world =
GetGame().GetWorld();
1375 PlayerController playerController =
GetGame().GetPlayerManager().GetPlayerController(playerId);
1392 int playerId = pc.GetPlayerId();
1395 SCR_RespawnSystemComponent respawnSystem =
m_CampaignGamemode.GetRespawnSystemComponent();
1400 FactionManager factionManager =
GetGame().GetFactionManager();
1402 if (!factionManager)
1415 if (availableSpawnpoints.Count() < 1)
1437 PlayerController controller = PlayerController.Cast(component.GetOwner());
1438 FactionManager factionManager =
GetGame().GetFactionManager();
1440 if (!factionManager)
1443 Faction factionUS = factionManager.GetFactionByIndex(factionIndex);
1457 PlayerController controller = PlayerController.Cast(component.GetOwner());
1469 PlayerController controller = PlayerController.Cast(requestComponent.GetOwner());
1484 if (!playerFactionAffiliation.RequestFaction(faction))
1499 if (!playerLoadoutComponent.RequestLoadout(
loadout))
1517 ResourceName loadoutResource =
loadout.GetLoadoutResource();
1519 if (!spawnComponent.RequestSpawn(spawnData))
1571 ent = ent.GetParent();
1573 ActionsManagerComponent amc = ActionsManagerComponent.Cast(ent.FindComponent(ActionsManagerComponent));
1581 vector pos = context.GetOrigin();
1583 waypoint.SetOrigin(pos);
1592 m_Radio = BaseRadioComponent.Cast(item.FindComponent(BaseRadioComponent));
1601 CharacterAnimationComponent comp = CharacterAnimationComponent.Cast(
m_Player.FindComponent(CharacterAnimationComponent));
1608 comp.GetMovementState(mState);
1611 ret = mState.m_CommandTypeId == command;
1640 return comp.IsLeaning();
1650 CameraHandlerComponent comp = CameraHandlerComponent.Cast(
m_Player.FindComponent(CameraHandlerComponent));
1654 if (comp.IsInThirdPerson())
1684 if (!compartmentAccessComponent)
1687 if (compartmentAccessComponent.GetVehicle())
1698 compartmentAccessComponent.MoveInVehicle(veh, seat);
1708 CompartmentAccessComponent compartmentAccessComponent = CompartmentAccessComponent.Cast(
m_Player.FindComponent(CompartmentAccessComponent));
1710 if (!compartmentAccessComponent)
1713 BaseCompartmentSlot compartmentSlot = compartmentAccessComponent.GetCompartment();
1715 if (!compartmentSlot)
1718 return compartmentSlot.GetType() == seat;
1731 CharacterControllerComponent charController = CharacterControllerComponent.Cast(
m_Player.FindComponent(CharacterControllerComponent));
1733 if (!charController)
1736 if (charController.IsDead())
1754 void MovePlayer(notnull IEntity newPos, ResourceName loadoutResourceName)
1759 AnimateWidget.Opacity(
m_wFadeOut, 0, FADE_SPEED);
1765 EntitySpawnParams
params = EntitySpawnParams();
1766 params.TransformMode = ETransformMode.WORLD;
1767 newPos.GetWorldTransform(
params.Transform);
1769 Resource res = Resource.Load(loadoutResourceName);
1774 if (!playerController)
1777 IEntity oldCharacter = playerController.GetControlledEntity();
1780 Print(
"SCR_CampaignTutorialArlandComponent:: No playercontrolled entity found!", LogLevel.WARNING);
1786 SCR_CharacterIdentityComponent identityComp = SCR_CharacterIdentityComponent.Cast(oldCharacter.FindComponent(SCR_CharacterIdentityComponent));
1788 oldIdentity = identityComp.GetIdentity();
1790 IEntity newCharacter =
GetGame().SpawnEntityPrefab(res,
null,
params);
1794 identityComp = SCR_CharacterIdentityComponent.Cast(newCharacter.FindComponent(SCR_CharacterIdentityComponent));
1795 if (identityComp && oldIdentity)
1796 identityComp.SetIdentity(oldIdentity);
1798 m_Player = ChimeraCharacter.Cast(newCharacter);
1799 playerController.SetControlledEntity(newCharacter);
1818 void DelayedPopup(
string text =
"",
string subtitle =
"",
float duration =
SCR_PopUpNotification.DEFAULT_DURATION,
string param1 =
"",
string param2 =
"",
string subtitleParam1 =
"",
string subtitleParam2 =
"")
1829 m_Stage.OnStructureBuilt(base, structure);
1836 m_Player = ChimeraCharacter.Cast(entity);
1852 display.AllowShowingInfo(
false);
1858 m_HQUS.AlterSupplyIncomeTimer(9999999);
1861 IEntity WP_cottage =
GetGame().GetWorld().FindEntityByName(
"WP_CONFLICT_COMPAS_MOVE");
1862 IEntity WP_mobileHQ =
GetGame().GetWorld().FindEntityByName(
"WP_CONFLICT_MAP_MOVE");
1863 SCR_MapDescriptorComponent cottageDescr = SCR_MapDescriptorComponent.Cast(WP_cottage.FindComponent(SCR_MapDescriptorComponent));
1864 SCR_MapDescriptorComponent mobileTruckDescr = SCR_MapDescriptorComponent.Cast(WP_mobileHQ.FindComponent(SCR_MapDescriptorComponent));
1865 cottageDescr.Item().SetVisible(
false);
1866 mobileTruckDescr.Item().SetVisible(
false);
1892 Widget waypointFrame =
GetGame().GetHUDManager().CreateLayout(
"{825C6D728AC3E029}UI/layouts/Tutorial/TutorialWaypointEdited.layout",
EHudLayers.BACKGROUND);
1893 m_aWaypoints.Insert(waypointFrame.FindAnyWidget(
"RootTutorialHud"));
1896 ImageWidget image = ImageWidget.Cast(waypointFrame.FindAnyWidget(
"Icon"));
1897 image.SetOpacity(0);
1899 image.SetColor(Color.FromInt(Color.YELLOW));
1902 RichTextWidget text = RichTextWidget.Cast(waypointFrame.FindAnyWidget(
"Distance"));
1904 text.SetColor(Color.FromInt(Color.YELLOW));
1907 image = ImageWidget.Cast(waypointFrame.FindAnyWidget(
"IconExtra"));
1908 image.SetOpacity(0);
1909 image.SetVisible(
false);
1911 image.SetColor(Color.FromInt(Color.YELLOW));
1920 waypoints.RemoveFromHierarchy();
1932 ImageWidget waypointMisc;
1936 waypointMisc = ImageWidget.Cast(
m_aWaypoints[
index].FindAnyWidget(
"IconExtra"));
1938 waypointMisc.SetVisible(visible);
1949 while (!playerPos && stage > 0)
1951 playerPos =
GetGame().GetWorld().FindEntityByName(
string.Format(
"PP_%1", stages.GetVariableName(stage)));
1992 gamemode.EndGameMode(endData)
1996 stage.FlushWaypoints();
1999 if (nextStage == -1)
2038 if (stageInfo.GetIndex() ==
m_eStage)
2056 while (!playerPos && stage >= 0)
2058 playerPos =
GetGame().GetWorld().FindEntityByName(
string.Format(
"PP_%1", stages.GetVariableName(stage)));
2082 waypoint.SetVisible(hide);
2093 if (waypoints.IsEmpty())
2096 foreach (IEntity waypoint : waypoints)
2101 vector WPPos = waypoint.GetOrigin();
2102 ImageWidget markerPos;
2103 ImageWidget markerExtra;
2104 RichTextWidget markerDistance;
2105 WPPos[1] = WPPos[1] + heightOffset;
2106 vector pos =
GetGame().GetWorkspace().ProjWorldToScreen(WPPos,
GetGame().GetWorld());
2107 int dist = vector.Distance(
m_Player.GetOrigin(), WPPos);
2110 WorkspaceWidget workspace =
GetGame().GetWorkspace();
2111 int winX = workspace.GetWidth();
2112 int winY = workspace.GetHeight();
2113 int posX = workspace.DPIScale(pos[0]);
2114 int posY = workspace.DPIScale(pos[1]);
2118 else if (posX > winX)
2119 pos[0] = workspace.DPIUnscale(winX);
2123 else if (posY > winY || pos[2] < 0)
2124 pos[1] = workspace.DPIUnscale(winY);
2128 int distShown = dist;
2132 distShown = dist - (dist % 1000);
2134 else if (dist > 100)
2136 distShown = dist - (dist % 100);
2140 distShown = dist - (dist % 50);
2144 float distanceOpacity = 1;
2146 if (dist < WAYPOINT_FADE_THRESHOLD)
2147 opacity = Math.Lerp(WAYPOINT_MINIMUM_OPACITY, 1, dist / WAYPOINT_FADE_THRESHOLD);
2149 if (dist >= WAYPOINT_DISTANCE_INDICATOR_FADE_START)
2151 distanceOpacity = 1;
2153 else if (dist <= WAYPOINT_DISTANCE_INDICATOR_FADE_END)
2155 distanceOpacity = 0;
2159 distanceOpacity = Math.InverseLerp(WAYPOINT_DISTANCE_INDICATOR_FADE_END, WAYPOINT_DISTANCE_INDICATOR_FADE_START, dist);
2162 markerPos = ImageWidget.Cast(
m_aWaypoints[x].FindAnyWidget(
"Icon"));
2163 markerExtra = ImageWidget.Cast(
m_aWaypoints[x].FindAnyWidget(
"IconExtra"));
2164 markerDistance = RichTextWidget.Cast(
m_aWaypoints[x].FindAnyWidget(
"Distance"));
2166 markerPos.SetOpacity(opacity);
2167 markerExtra.SetOpacity(opacity);
2168 markerDistance.SetOpacity(distanceOpacity);
2169 markerDistance.SetTextFormat(
"#AR-Tutorial_WaypointUnits_meters", distShown);
2189 if (!supplyTruckComponent)
2192 Vehicle truck = Vehicle.Cast(ent.GetParent());
2198 truck.SetName(
"BuildingSupplyTruck");
2205 array<ref SCR_CampaignTutorialArlandStageInfo> stagelist = {};
2217 DiagMenu.RegisterRange(
SCR_DebugMenuID.DEBUGUI_TUTORIAL_STAGE,
"",
"Stage",
"Tutorial",
string.Format(
"0 %1 0 1",
m_iStagesCnt - 1));
2238 MusicManager musicMan = world.GetMusicManager();
2242 array<int> musicCategories = {};
2245 foreach (
int category : musicCategories)
2247 musicMan.MuteCategory(
category,
true,
true);
2253 DiagMenu.RegisterMenu(
SCR_DebugMenuID.DEBUGUI_TUTORIAL_MENU,
"Tutorial",
"");
2254 DiagMenu.RegisterItem(
SCR_DebugMenuID.DEBUGUI_TUTORIAL_CONFIG,
"",
"Config",
"Tutorial",
"Hub,Movement,Weapons,ConflictSimple,ConflictSige,Driving");
2255 DiagMenu.RegisterRange(
SCR_DebugMenuID.DEBUGUI_TUTORIAL_STAGE,
"",
"Stage",
"Tutorial",
string.Format(
"0 %1 0 1",
m_iStagesCnt - 1));
2259 Resource holder = BaseContainerTools.LoadContainer(m_sStagesConfigAdvanced);
2263 BaseContainer container = holder.GetResource().ToBaseContainer();
2302 waypoint.RemoveFromHierarchy();