7 [
Attribute(
"{14FDB620B5FF18BC}Configs/Tutorial/TutorialStagesConfig.conf",
UIWidgets.ResourceNamePicker,
"",
"conf")]
10 [
Attribute(
"{86D830868F026D54}Prefabs/Vehicles/Wheeled/M151A2/M151A2_MERDC.et",
UIWidgets.ResourceNamePicker,
"",
"conf")]
15 protected const string FADEOUT_LAYOUT =
"{265245C299401BF6}UI/layouts/Menus/ContentBrowser/DownloadManager/ScrollBackground.layout";
21 protected ref array<ref SCR_MapMarkerBase>
m_aMarkers = {};
73 bool m_bIgnoreCourseRequirements;
75 protected bool m_bDrawAreaRestrictions;
85 array <BaseUserAction> outActions = {};
86 actionsMan.GetActionsList(outActions);
87 if (!outActions || outActions.IsEmpty())
109 BaseInventoryStorageComponent storageComp = BaseInventoryStorageComponent.Cast(ent.
FindComponent(BaseInventoryStorageComponent));
114 if (!attributeCollection)
117 attributeCollection.SetRefundable(enable);
133 void SetupTargets(
string parentTargetName, out array <SCR_FiringRangeTarget> targets = null,
ETargetState setupState = -1,
bool setupAutoReset =
true)
139 target.SetAutoResetTarget(setupAutoReset);
140 target.SetState(setupState);
143 targets.Insert(target);
150 targets.Insert(target);
152 target.SetAutoResetTarget(setupAutoReset);
153 target.SetState(setupState);
172 name = damageManager.GetOwner().GetName();
173 if (name ==
"RespawnAmbulance" || name ==
"UH1COURSE" || name ==
"SmallJeep")
176 damageManager.FullHeal();
189 IEntity owner = damageManager.GetOwner();
190 if (owner.
GetName() ==
"TARGET_BTR")
198 Instigator instigator = damageManager.GetInstigator();
202 IEntity instigatorEntity = instigator.GetInstigatorEntity();
265 SCR_BaseLockComponent lockComp = SCR_BaseLockComponent.Cast(vehicle.FindComponent(SCR_BaseLockComponent));
269 lockComp.SetLocked(lock);
275 BaseWeaponManagerComponent weaponManager = BaseWeaponManagerComponent.Cast(
m_Player.FindComponent(BaseWeaponManagerComponent));
279 array<IEntity> weapons = {};
280 weaponManager.GetWeaponsList(weapons);
282 if (!weapons || weapons.IsEmpty())
286 foreach (
IEntity weapon : weapons)
307 ammoCount = muzzle.GetAmmoCount();
312 const typename magazineType = magWell.Type();
314 array<IEntity> foundItems = {};
316 foreach (
IEntity item : foundItems)
322 auto magazineWell = magazine.GetMagazineWell();
326 if (magazineWell.Type() == magazineType)
327 ammoCount += magazine.GetAmmoCount();
377 CompartmentAccessComponent compartmentAccess = character.GetCompartmentAccessComponent();
378 if (!compartmentAccess)
381 SCR_BaseCompartmentManagerComponent compartmentManager = SCR_BaseCompartmentManagerComponent.Cast(vehicle.FindComponent(SCR_BaseCompartmentManagerComponent));
382 if (!compartmentManager)
385 array<BaseCompartmentSlot> outCompartments = {};
386 compartmentManager.GetCompartmentsOfType(outCompartments, compartmentType);
389 compartmentAccess.GetInVehicle(vehicle, outCompartments[compartmentIndex],
true, 0,
ECloseDoorAfterActions.CLOSE_DOOR,
false);
391 SCR_NarrativeComponent narrativeComponent = SCR_NarrativeComponent.Cast(character.FindComponent(SCR_NarrativeComponent));
393 if (!SCR_NarrativeComponent)
396 narrativeComponent.Initialize(character);
431 GetGame().GetMenuManager().CloseAllMenus();
447 world.GetMusicManager().Play(
"SOUND_END_BAD");
480 SCR_HintManagerComponent.HideHint();
481 SCR_HintManagerComponent.ClearLatestHint();
484 if (editorManager && editorManager.IsOpened())
485 editorManager.Toggle();
490 narratedCharacter.Initialize(narratedCharacter.GetOwner());
508 GetGame().GetCallqueue().CallLater(
m_Stage.PlayNarrativeCharacterStage, 2000,
false,
"Ambulance_Doctor", 1);
538 CharacterControllerComponent characterController =
m_Player.GetCharacterController();
539 if (!characterController)
542 characterController.SetDisableViewControls(!enable);
543 characterController.SetDisableWeaponControls(!enable);
544 characterController.SetDisableMovementControls(!enable)
562 text.SetText(
"#AR-Tutorial_Hint_CourseTerminatedByFriendlyFire");
564 text.SetText(
"#AR-Tutorial_Hint_CourseTerminatedByMisbehaving");
601 SCR_NarrativeComponent narrative = SCR_NarrativeComponent.Cast(entity.
FindComponent(SCR_NarrativeComponent));
611 narrative.PlayAnimation(
true,
"CMD_NarrativeStage", stage);
621 static SCR_TutorialGamemodeComponent GetInstance()
623 BaseGameMode gamemode =
GetGame().GetGameMode();
627 return SCR_TutorialGamemodeComponent.Cast(gamemode.FindComponent(SCR_TutorialGamemodeComponent));
645 predicate.m_sSeachPrefab = prefabName;
647 IEntity item = inventory.FindItem(predicate);
656 if (item && item.
GetPrefabData().GetPrefabName() == prefabName)
660 foreach (
IEntity ent : entities)
665 if (ent.GetPrefabData().GetPrefabName() == prefabName)
689 if (inventory.Contains(entity))
693 predicate.m_SearchEntity = entity;
695 IEntity item = inventory.FindItem(predicate);
708 foreach (
IEntity ent : entities)
723 return SCR_InventoryStorageManagerComponent.Cast(
m_Player.FindComponent(SCR_InventoryStorageManagerComponent));
730 if (!playerController)
733 SCR_PlayerControllerGroupComponent playerGroupComp = SCR_PlayerControllerGroupComponent.Cast(playerController.FindComponent(SCR_PlayerControllerGroupComponent));
734 if (!playerGroupComp)
743 SCR_AIGroup group = groupsManager.FindGroup(playerGroupComp.GetGroupID());
748 playerGroupComp.RequestJoinGroup(group.
GetGroupID());
749 groupsManager.SetGroupLeader(group.
GetGroupID(), 1);
783 array <SCR_Task> tasks = {};
784 taskSystem.GetTasks(tasks);
793 taskId =
task.GetTaskID();
827 foreach (SCR_TutorialInstructorComponent instructor :
m_aInstructors)
829 if (!instructor || instructor.GetCourseType() != courseType)
832 position = instructor.GetOwner().GetOrigin();
848 task.SetTaskIconPath(
"{D43428C02A644C1B}UI/Imagesets/Tutorial-Courses/Tutorial-Courses.imageset");
878 pc.SetGadgetFocus(
false);
885 if (!playerLoadoutComp)
903 foreach (SCR_TutorialInstructorComponent instructor :
m_aInstructors)
908 if (instructor.GetCourseType() == course)
933 task.SetOrigin(instructor.GetOwner().GetOrigin());
996 m_Stage.UnregisterWaypoint(
"CampGreenhornSign");
1010 CompartmentAccessComponent compartmentComp =
m_Player.GetCompartmentAccessComponent();
1011 if (compartmentComp)
1017 compartmentComp.GetOutVehicle(
EGetOutType.TELEPORT, -1,
false,
false);
1038 vector transformation[4];
1053 tmwManager.SetTimeOfTheDay(tmwManager.GetTimeOfTheDay()+0.2);
1055 if (!player.GetDamageManager().IsDestroyed())
1056 player.Teleport(transformation);
1071 if (subtitlesDisplay)
1072 subtitlesDisplay.Show(
false);
1094 if (voiceDataConfig.IsEmpty())
1103 SCR_MapMarkerManagerComponent mapMarkerManager = SCR_MapMarkerManagerComponent.Cast(
GetGame().
GetGameMode().FindComponent(SCR_MapMarkerManagerComponent));
1104 if (!mapMarkerManager)
1107 array <SCR_MapMarkerBase> markerArray = {};
1108 markerArray = mapMarkerManager.GetStaticMarkers();
1111 if (!markerArray.IsIndexValid(
index) || !markerArray[
index])
1114 mapMarkerManager.RemoveStaticMarker(markerArray[
index]);
1128 if (!playerController)
1131 SCR_AchievementsHandler handler = SCR_AchievementsHandler.Cast(playerController.FindComponent(SCR_AchievementsHandler));
1148 SCR_MapDescriptorComponent descr = SCR_MapDescriptorComponent.Cast(ent.
FindComponent(SCR_MapDescriptorComponent));
1152 descr.Item().SetVisible(enable);
1161 CharacterControllerComponent charController =
m_Player.GetCharacterController();
1162 if (!charController)
1169 float aimAngle =
Math.MapAngle(
Math.RAD2DEG * inputContext.GetAimingAngles()[0], 360, 0, 360);
1171 return Math.IsInRange(aimAngle, angle-tolerance, angle+tolerance);
1178 if (modeEntity.GetModeType() !=
EEditorMode.BUILDING)
1192 if (!SCR_HintManagerComponent.GetInstance())
1199 SCR_HintManagerComponent.ShowHint(hintInfo,
true);
1265 if (!SCR_HintManagerComponent.GetInstance())
1268 if (!SCR_HintManagerComponent.GetInstance().IsShown())
1285 m_Stage.OnInputDeviceChanged(switchedToKeyboard);
1343 spawnpoint =
GetGame().
GetWorld().FindEntityByName(
string.Format(
"SpawnPos_%1", name));
1349 if (name !=
string.Empty)
1352 if (oldEntity && respawn)
1356 oldEntity.
SetName(
"OldPlayerVeh");
1372 params.TransformMode = ETransformMode.WORLD;
1373 spawnpoint.GetWorldTransform(
params.Transform);
1388 Physics physicsComponent = veh.GetPhysics();
1390 if (physicsComponent)
1391 physicsComponent.SetVelocity(
"0 -1 0");
1396 SCR_DamageManagerComponent damManager = SCR_DamageManagerComponent.Cast(newEntity.
FindComponent(SCR_DamageManagerComponent));
1442 comp.GetMovementState(mState);
1445 ret = mState.m_CommandTypeId == command;
1481 if (comp.IsInThirdPerson())
1574 array <SCR_ETutorialCourses> finishedCourses = {};
1577 for (
int i = finishedCourses.Count()-1; i >= 0; i--)
1580 finishedCourses.Remove(i);
1586 for (
int i = finishedCourses.Count()-1; i >= 0; i--)
1589 finishedCourses.Remove(i);
1592 SCR_HintManagerComponent.HideHint();
1593 SCR_HintManagerComponent.ClearLatestHint();
1600 description +=
m_CoursesConfig.GetCourse(course).GetTaskTitle() +
"<br/>";
1603 if (!description.IsEmpty())
1606 SCR_HintManagerComponent.ShowHint(hintInfo);
1614 MusicManager manager = world.GetMusicManager();
1646 world.GetMusicManager().Play(
"SOUND_END_GOOD");
1648 world.GetMusicManager().Play(
"SOUND_COURSE_DONE");
1666 if (info.GetStageName() == name)
1767 world.GetMusicManager().Play(
"SOUND_COURSE_START");
1780 Instigator instigator = damageContext.instigator;
1785 if (damageContext.damageType ==
EDamageType.COLLISION)
1788 if (instigatorEnt && instigatorEnt.IsInVehicle() && instigatorEnt.GetParent() == damageContext.hitEntity.
GetParent())
1796 if (!damManager.
IsBleeding() && !damManager.IsDestroyed())
1804 if (damageContext.damageSource)
1811 SCR_DamageManagerComponent damManager = SCR_DamageManagerComponent.Cast(ent.FindComponent(SCR_DamageManagerComponent));
1815 return damManager.IsDestroyed() || damManager.GetHealth() != damManager.GetMaxHealth();
1821 SCR_DamageManagerComponent damManager;
1824 array <SCR_TutorialCoursePrefabInfo> prefabInfos = {};
1826 if (courseType != -1)
1841 entity =
GetGame().
GetWorld().FindEntityByName(prefabInfo.m_sEntityName);
1842 position =
GetGame().GetWorld().FindEntityByName(prefabInfo.m_sSpawnPosName);
1844 if ((entity && !prefabInfo.m_bRespawn) || !
position)
1850 if (entity && prefabInfo.m_bRespawnDistance && (
vector.Distance(entity.
GetOrigin(),
position.GetOrigin()) < prefabInfo.m_fRespawnMinimumDistance))
1866 array <SCR_TutorialCoursePrefabInfo> prefabInfos = {};
1872 if (!prefabInfo.m_bDespawnAfterCourse)
1875 if (prefabInfo.m_sEntityName ==
string.Empty)
1878 ent =
GetGame().
GetWorld().FindEntityByName(prefabInfo.m_sEntityName);
1891 super.OnPlayerRegistered(playerId);
1894 PlayerController playerController =
GetGame().GetPlayerManager().GetPlayerController(playerId);
1898 factionComp.
RequestFaction(factionManager.GetFactionByKey(
"US"));
1916 editorManager.AutoInit();
1934 garbageSys.Flush(0);
1942 world.GetMusicManager().Play(
"SOUND_ONSPAWN");
1949 if (!characterController)
1956 vector bedTransformation[4];
1957 position.GetTransform(bedTransformation);
1964 GetGame().GetCallqueue().CallLater(
Fadeout, 1500,
false,
false, 1, 0);
1971 IEntity victim = instigatorContextData.GetVictimEntity();
1987 IEntity killer = instigatorContextData.GetKillerEntity();
2061 array <SCR_Task> tasks = {};
2062 taskSystem.GetTasks(tasks);
2071 taskId =
task.GetTaskID();
2088 array <ref SCR_TutorialCourse> courses = {};
2100 courseType = course.GetCourseType();
2102 if (course.CanCreateTask())
2111 taskName =
task.GetTaskName();
2131 areaRestrictionEntName =
m_ActiveConfig.GetCourseAreaCenterEntityName();
2144 if (warningDist == -1)
2148 if (breakDist == -1)
2151 if (warningDist == -1 || breakDist == -1)
2172 world.GetMusicManager().Play(
"SOUND_LEAVING_COURSE");
2180 SCR_HintManagerComponent.ShowHint(hintInfo);
2185 SCR_HintManagerComponent.HideHint();
2186 SCR_HintManagerComponent.ClearLatestHint();
2192 SCR_HintManagerComponent.ShowHint(hintInfo);
2256 DiagMenu.RegisterBool(
SCR_DebugMenuID.DEBUGUI_NEWTUTORIAL_DISABLE_COURSE_REQUIREMENTS,
"",
"Disable course reqs ",
"Tutorial");
2258 DiagMenu.RegisterBool(
SCR_DebugMenuID.DEBUGUI_NEWTUTORIAL_REGENERATE_TASKS,
"",
"Regenerate course tasks",
"Tutorial");
2260 DiagMenu.RegisterBool(
SCR_DebugMenuID.DEBUGUI_NEWTUTORIAL_COURSE_SKIP_AI_DRIVING,
"",
"Skip AI Driving",
"Tutorial");
2261 DiagMenu.RegisterBool(
SCR_DebugMenuID.DEBUGUI_NEWTUTORIAL_COURSE_FINISH_STAGE,
"",
"Finish current stage",
"Tutorial");
2262 DiagMenu.RegisterBool(
SCR_DebugMenuID.DEBUGUI_NEWTUTORIAL_COURSE_MOVE_TO_WP,
"",
"Move to waypoint",
"Tutorial");
2263 DiagMenu.RegisterBool(
SCR_DebugMenuID.DEBUGUI_NEWTUTORIAL_SET_EVENING_TIME,
"",
"Set evening time",
"Tutorial");
2264 DiagMenu.RegisterBool(
SCR_DebugMenuID.DEBUGUI_NEWTUTORIAL_DUMP_STAGES_INTO_LOG,
"",
"Dump stages into log",
"Tutorial");
2265 DiagMenu.RegisterBool(
SCR_DebugMenuID.DEBUGUI_NEWTUTORIAL_FINISH_EVERYTHING,
"",
"Finish all courses",
"Tutorial");
2266 DiagMenu.RegisterBool(
SCR_DebugMenuID.DEBUGUI_NEWTUTORIAL_DRAW_AREA_RESTRICTIONS,
"",
"Draw Area Restrictions",
"Tutorial");
2268 DiagMenu.RegisterBool(
SCR_DebugMenuID.DEBUGUI_NEWTUTORIAL_COURSE_LOCATION_OBSTACLE,
"",
"OBSTACLE COURSE",
"Course locations");
2269 DiagMenu.RegisterBool(
SCR_DebugMenuID.DEBUGUI_NEWTUTORIAL_COURSE_LOCATION_FIRING,
"",
"FIRING RANGE",
"Course locations");
2270 DiagMenu.RegisterBool(
SCR_DebugMenuID.DEBUGUI_NEWTUTORIAL_COURSE_LOCATION_ENGINEERING,
"",
"COMBAT ENGINEERING",
"Course locations");
2271 DiagMenu.RegisterBool(
SCR_DebugMenuID.DEBUGUI_NEWTUTORIAL_COURSE_LOCATION_SEIZING,
"",
"SEIZING",
"Course locations");
2272 DiagMenu.RegisterBool(
SCR_DebugMenuID.DEBUGUI_NEWTUTORIAL_COURSE_LOCATION_AID,
"",
"FIRST AID",
"Course locations");
2273 DiagMenu.RegisterBool(
SCR_DebugMenuID.DEBUGUI_NEWTUTORIAL_COURSE_LOCATION_DRIVING,
"",
"DRIVING",
"Course locations");
2274 DiagMenu.RegisterBool(
SCR_DebugMenuID.DEBUGUI_NEWTUTORIAL_COURSE_LOCATION_NAVIGATION,
"",
"NAVIGATION",
"Course locations");
2275 DiagMenu.RegisterBool(
SCR_DebugMenuID.DEBUGUI_NEWTUTORIAL_COURSE_LOCATION_HELICOPTERS,
"",
"HELICOPTER PILOTING",
"Course locations");
2276 DiagMenu.RegisterBool(
SCR_DebugMenuID.DEBUGUI_NEWTUTORIAL_COURSE_LOCATION_SPECIAL,
"",
"SPECIAL WEAPONS",
"Course locations");
2277 DiagMenu.RegisterBool(
SCR_DebugMenuID.DEBUGUI_NEWTUTORIAL_COURSE_LOCATION_LONGRANGE,
"",
"LONG-DISTANCE SHOOTING",
"Course locations");
2278 DiagMenu.RegisterBool(
SCR_DebugMenuID.DEBUGUI_NEWTUTORIAL_COURSE_LOCATION_FIRESUPPORT,
"",
"FIRE SUPPORT COURSE",
"Course locations");
2279 DiagMenu.RegisterBool(
SCR_DebugMenuID.DEBUGUI_NEWTUTORIAL_COURSE_LOCATION_LEADERSHIP,
"",
"SQUAD LEADERSHIP",
"Course locations");
2280 DiagMenu.RegisterBool(
SCR_DebugMenuID.DEBUGUI_NEWTUTORIAL_COURSE_LOCATION_MAINTENANCE,
"",
"VEHICLE MAINTENANCE",
"Course locations");
2282 ConnectToDiagSystem(owner);
2297 if (onVehicleDamageStateChanged)
2316 BaseContainer container = holder.GetResource().ToBaseContainer();
2325 void DrawAreaRestrictions()
2332 if (warningDist == -1)
2338 if (breakDist == -1)
2351 IEntity newPos =
GetGame().GetWorld().FindEntityByName(
"COMMANDING_CROSSROAD_STOP");
2355 vector transformation[4];
2357 jeep.SetTransform(transformation);
2359 if (!jeep.GetPilot())
2367 foreach (SCR_TutorialInstructorComponent instructor :
m_aInstructors)
2369 if (!instructor || instructor.GetCourseType() != course)
2372 instructorEnt = instructor.GetOwner();
2391 super.EOnDiag(owner, timeSlice);
2394 m_bIgnoreCourseRequirements = DiagMenu.GetBool(
SCR_DebugMenuID.DEBUGUI_NEWTUTORIAL_DISABLE_COURSE_REQUIREMENTS);
2395 m_bSkipIntro = DiagMenu.GetBool(
SCR_DebugMenuID.DEBUGUI_NEWTUTORIAL_SKIP_INTRO);
2397 if (DiagMenu.GetBool(
SCR_DebugMenuID.DEBUGUI_NEWTUTORIAL_DUMP_STAGES_INTO_LOG))
2399 DiagMenu.SetValue(
SCR_DebugMenuID.DEBUGUI_NEWTUTORIAL_DUMP_STAGES_INTO_LOG, 0);
2401 Print(
"***STAGE LIST***");
2402 foreach (
int i, SCR_TutorialStageInfo stageInfo :
m_aStageInfos)
2412 if (DiagMenu.GetBool(
SCR_DebugMenuID.DEBUGUI_NEWTUTORIAL_REGENERATE_TASKS))
2414 DiagMenu.SetValue(
SCR_DebugMenuID.DEBUGUI_NEWTUTORIAL_REGENERATE_TASKS, 0);
2418 if (DiagMenu.GetBool(
SCR_DebugMenuID.DEBUGUI_NEWTUTORIAL_COURSE_FINISH_STAGE))
2420 DiagMenu.SetValue(
SCR_DebugMenuID.DEBUGUI_NEWTUTORIAL_COURSE_FINISH_STAGE, 0);
2424 if (DiagMenu.GetBool(
SCR_DebugMenuID.DEBUGUI_NEWTUTORIAL_COURSE_MOVE_TO_WP))
2426 DiagMenu.SetValue(
SCR_DebugMenuID.DEBUGUI_NEWTUTORIAL_COURSE_MOVE_TO_WP, 0);
2439 if (DiagMenu.GetBool(
SCR_DebugMenuID.DEBUGUI_NEWTUTORIAL_COURSE_LOCATION_OBSTACLE))
2441 DiagMenu.SetValue(
SCR_DebugMenuID.DEBUGUI_NEWTUTORIAL_COURSE_LOCATION_OBSTACLE, 0);
2445 if (DiagMenu.GetBool(
SCR_DebugMenuID.DEBUGUI_NEWTUTORIAL_COURSE_LOCATION_FIRING))
2447 DiagMenu.SetValue(
SCR_DebugMenuID.DEBUGUI_NEWTUTORIAL_COURSE_LOCATION_FIRING, 0);
2451 if (DiagMenu.GetBool(
SCR_DebugMenuID.DEBUGUI_NEWTUTORIAL_COURSE_LOCATION_ENGINEERING))
2453 DiagMenu.SetValue(
SCR_DebugMenuID.DEBUGUI_NEWTUTORIAL_COURSE_LOCATION_ENGINEERING, 0);
2457 if (DiagMenu.GetBool(
SCR_DebugMenuID.DEBUGUI_NEWTUTORIAL_COURSE_LOCATION_SEIZING))
2459 DiagMenu.SetValue(
SCR_DebugMenuID.DEBUGUI_NEWTUTORIAL_COURSE_LOCATION_SEIZING, 0);
2463 if (DiagMenu.GetBool(
SCR_DebugMenuID.DEBUGUI_NEWTUTORIAL_COURSE_LOCATION_AID))
2465 DiagMenu.SetValue(
SCR_DebugMenuID.DEBUGUI_NEWTUTORIAL_COURSE_LOCATION_AID, 0);
2469 if (DiagMenu.GetBool(
SCR_DebugMenuID.DEBUGUI_NEWTUTORIAL_COURSE_LOCATION_DRIVING))
2471 DiagMenu.SetValue(
SCR_DebugMenuID.DEBUGUI_NEWTUTORIAL_COURSE_LOCATION_DRIVING, 0);
2475 if (DiagMenu.GetBool(
SCR_DebugMenuID.DEBUGUI_NEWTUTORIAL_COURSE_LOCATION_NAVIGATION))
2477 DiagMenu.SetValue(
SCR_DebugMenuID.DEBUGUI_NEWTUTORIAL_COURSE_LOCATION_NAVIGATION, 0);
2481 if (DiagMenu.GetBool(
SCR_DebugMenuID.DEBUGUI_NEWTUTORIAL_COURSE_LOCATION_HELICOPTERS))
2483 DiagMenu.SetValue(
SCR_DebugMenuID.DEBUGUI_NEWTUTORIAL_COURSE_LOCATION_HELICOPTERS, 0);
2487 if (DiagMenu.GetBool(
SCR_DebugMenuID.DEBUGUI_NEWTUTORIAL_COURSE_LOCATION_SPECIAL))
2489 DiagMenu.SetValue(
SCR_DebugMenuID.DEBUGUI_NEWTUTORIAL_COURSE_LOCATION_SPECIAL, 0);
2493 if (DiagMenu.GetBool(
SCR_DebugMenuID.DEBUGUI_NEWTUTORIAL_COURSE_LOCATION_LONGRANGE))
2495 DiagMenu.SetValue(
SCR_DebugMenuID.DEBUGUI_NEWTUTORIAL_COURSE_LOCATION_LONGRANGE, 0);
2499 if (DiagMenu.GetBool(
SCR_DebugMenuID.DEBUGUI_NEWTUTORIAL_COURSE_LOCATION_FIRESUPPORT))
2501 DiagMenu.SetValue(
SCR_DebugMenuID.DEBUGUI_NEWTUTORIAL_COURSE_LOCATION_FIRESUPPORT, 0);
2505 if (DiagMenu.GetBool(
SCR_DebugMenuID.DEBUGUI_NEWTUTORIAL_COURSE_LOCATION_LEADERSHIP))
2507 DiagMenu.SetValue(
SCR_DebugMenuID.DEBUGUI_NEWTUTORIAL_COURSE_LOCATION_LEADERSHIP, 0);
2511 if (DiagMenu.GetBool(
SCR_DebugMenuID.DEBUGUI_NEWTUTORIAL_COURSE_LOCATION_MAINTENANCE))
2513 DiagMenu.SetValue(
SCR_DebugMenuID.DEBUGUI_NEWTUTORIAL_COURSE_LOCATION_MAINTENANCE, 0);
2517 if (DiagMenu.GetBool(
SCR_DebugMenuID.DEBUGUI_NEWTUTORIAL_COURSE_SKIP_AI_DRIVING))
2519 DiagMenu.SetValue(
SCR_DebugMenuID.DEBUGUI_NEWTUTORIAL_COURSE_SKIP_AI_DRIVING, 0);
2523 if (DiagMenu.GetBool(
SCR_DebugMenuID.DEBUGUI_NEWTUTORIAL_FINISH_EVERYTHING))
2525 DiagMenu.SetValue(
SCR_DebugMenuID.DEBUGUI_NEWTUTORIAL_FINISH_EVERYTHING, 0);
2527 array <int> courses = {};
2530 foreach (
int course : courses)
2535 SetCourseCompleted(course);
2547 m_bDrawAreaRestrictions = DiagMenu.GetBool(
SCR_DebugMenuID.DEBUGUI_NEWTUTORIAL_DRAW_AREA_RESTRICTIONS);
2548 if (m_bDrawAreaRestrictions)
2549 DrawAreaRestrictions();
2556 super.OnDelete(owner);
2557 DisconnectFromDiagSystem(owner);
2573 if (onVehicleDamageStateChanged)
EFieldManualEntryId
used to grab the first id-matching Field Manual entry
ArmaReforgerScripted GetGame()
SCR_BaseGameMode GetGameMode()
void SCR_BaseGameModeComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
override void OnGameModeStart()
ChimeraCharacter m_Player
void OnMapClose(MapConfiguration config)
void OnMapOpen(MapConfiguration config)
ScriptInvoker GetOnEntitySpawned()
IEntity SpawnEntity(ResourceName entityResourceName, notnull IEntity slotOwner)
ref ScriptInvoker m_OnEntitySpawned
void SCR_CommandingManagerComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
void OnInputDeviceIsGamepad(bool isGamepad)
SCR_DestructionSynchronizationComponentClass ScriptComponentClass int index
SCR_ETutorialArlandStageMasters
void SCR_EditorManagerEntity(IEntitySource src, IEntity parent)
Get all prefabs that have the spawner data
void SCR_FactionManager(IEntitySource src, IEntity parent)
void SCR_GroupsManagerComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
void SCR_LoadoutManager(IEntitySource src, IEntity parent)
void OnControllableDestroyed(IEntity entity, IEntity killerEntity, Instigator instigator, notnull SCR_InstigatorContextData instigatorContextData)
SCR_MapGadgetComponentClass m_bIsMapOpen
Map gadget component.
override void EOnFrame(IEntity owner, float timeSlice)
SCR_PositionClass GenericEntityClass SCR_Position(IEntitySource src, IEntity parent)
void SCR_RespawnComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
override void OnPlayerSpawnFinalize_S(SCR_SpawnRequestComponent requestComponent, SCR_SpawnHandlerComponent handlerComponent, SCR_SpawnData data, IEntity entity)
void SCR_Task(IEntitySource src, IEntity parent)
ChimeraCharacter GetPlayer()
int GetFreeRoamActivations()
void DespawnCourseAssets()
SCR_TutorialCourse m_ActiveConfig
SCR_InventoryStorageManagerComponent GetPlayerInventory()
void ChangeVehicleLockState(notnull IEntity vehicle, bool lock)
void ShowMapDescriptor(string descriptorOwnerName, bool enable)
ResourceName m_sPlayerVehicleResourceName
ref array< IEntity > m_aGarbage
void OnModeAdded(SCR_EditorModeEntity modeEntity)
void OnObjectDestroyed(EDamageState state)
void SetCourseConfig(SCR_ETutorialCourses config, string stageName=string.Empty, bool spawnAssets=true)
void SpawnPlayer(string spawnPositionName)
ref array< SCR_TutorialInstructorComponent > m_aInstructors
SCR_BaseTutorialStage GetCurrentStage()
void RegisterInstructor(notnull SCR_TutorialInstructorComponent instructor)
float GetSavedViewDistance()
SCR_PlacingEditorComponent m_PlacingComponent
void OnCharacterDamaged(BaseDamageContext damageContext)
bool GetWas3rdPersonViewUsed()
ref ScriptInvoker m_OnFastTravelDone
const string TASK_COMPLETED_SUFFIX
void EnableControls(bool enable)
void InsertIntoGarbage(string entityName)
SCR_TutorialCourse GetActiveConfig()
void UnregisterInstructor(notnull SCR_TutorialInstructorComponent instructor)
WidgetAnimationOpacity GetOngoingFadeAnimation()
SCR_ETutorialCourses m_eFinishedCourses
void CreateCourseTask(SCR_ETutorialCourses courseType)
void EnableArsenal(string entityName, bool enable)
void OnEntitySpawned(int prefabID, SCR_EditableEntityComponent ent)
void CheckAreaRestrictions()
void RequestBreakCourse(SCR_ETutorialBreakType breakType)
bool IsDamagedOrDestroyed(notnull IEntity ent)
void Check3rdPersonViewUsed()
void GetInstructors(notnull array< SCR_TutorialInstructorComponent > instructors)
float m_fSavedViewDistance
void PlayNarrativeCharacterStageDelayed(string characterName, int stage)
void SetFreeRoamActivation(int activations)
void HideTasks(bool hide)
ScriptInvoker GetOnPlayerSpawned()
SCR_BaseTutorialStage m_Stage
void OnStructureBuilt(SCR_CampaignMilitaryBaseComponent base, IEntity structure)
Widget m_wPunishmentScreen
void OnFastTravelPreloadFinished()
int GetAmmoCountForWeapon(IEntity weapon)
void HandleSoundFade(float timeSlice)
void BlockBuildingModeAccess(notnull IEntity providerEntity, bool block)
int m_iFreeRoamActivations
float m_fSoundInterpolationSpeed
void OnInputDeviceChangedDelayed()
void ~SCR_TutorialGamemodeComponent()
void DelayedPopup(string text="", string subtitle="", float duration=SCR_PopUpNotification.DEFAULT_DURATION, string param1="", string param2="", string subtitleParam1="", string subtitleParam2="")
ref array< SCR_VehicleDamageManagerComponent > m_aDamagedVehicles
ref array< ref SCR_MapMarkerBase > m_aMarkers
bool m_fDelayedControlSchemeChangeRunning
void IncrementFreeRoamActivation()
IEntity m_FastTravelPosition
void InsertStage(string stageName, int position=-1)
IEntity m_AreaRestrictionCenter
SCR_PlacingEditorComponent GetPlacingComponent()
const int PUNISHMENT_TIMEOUT
void MoveCharacterIntoVehicle(notnull ChimeraCharacter character, notnull Vehicle vehicle, ECompartmentType compartmentType, int compartmentIndex=0)
const int GARBAGE_DESPAWN_DISTANCE_SQ
void EnableRefunding(IEntity ent, bool enable)
SCR_PreviewEntityEditorComponent GetPreviewEntityComponent()
void HandleRespawnBreak()
void OnVehicleDamaged(SCR_VehicleDamageManagerComponent damageManager)
ref array< ref SCR_TutorialStageInfo > m_aStageInfos
void RemoveFromGarbage(IEntity ent)
bool IsPlayerAimingInAngle(float angle, int tolerance)
void SetSoundFade(bool fadeOut, float duration=0)
void FastTravelToCourse(SCR_ETutorialCourses course)
bool CheckCharacterStance(ECharacterCommandIDs command)
SCR_ETutorialBreakType m_iBreakType
const string FADEOUT_LAYOUT
SCR_ETutorialCourses GetFinishedCourses()
SCR_TutorialCoursesConfig GetCoursesConfig()
ref ScriptInvoker m_OnPlayerSpawned
SCR_WaypointDisplay GetWaypointDisplay()
WidgetAnimationOpacity Fadeout(bool fadeOut, float duration=1, float soundDuration=duration)
void OnFastTravelFadeoutCompleted()
void RegisterMarker(notnull SCR_MapMarkerBase marker)
void SpawnCourseAssets(SCR_ETutorialCourses courseType=-1)
SCR_TutorialInstructorComponent GetCourseInstructor(SCR_ETutorialCourses course)
ScriptInvoker GetOnFastTravelDone()
void LoadProgress(SCR_ETutorialCourses completedCourses)
void SetupEditorModeListener()
IEntity FindPrefabInPlayerInventory(ResourceName prefabName)
void SaveViewDistance(float distance)
ref array< SCR_NarrativeComponent > m_aNarratedCharacters
WidgetAnimationOpacity m_OngoingFadeAnimation
void SetStage(string stageName)
void PlayBedAnimation(bool fast)
int GetStageIndexByName(string name)
void RemovePlayerMapMarkers()
SCR_VoiceoverSystem m_VoiceoverSystem
void SetupTargets(string parentTargetName, out array< SCR_FiringRangeTarget > targets=null, ETargetState setupState=-1, bool setupAutoReset=true)
int GetActiveStageIndex()
SCR_WaypointDisplay m_WaypointDisplay
Widget CreateWarningOverlay(bool killedNPC)
SCR_Task GetCourseTask(SCR_ETutorialCourses course)
void RepairWorldVehicles()
void HandleGarbage(bool force=false)
bool m_bProtectionWarning
bool IsCourseAvailable(SCR_ETutorialCourses courseType)
bool IsEntityInPlayerInventory(string entityName)
ref SCR_TutorialCoursesConfig m_CoursesConfig
void SCR_VehicleDamageManagerComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
enum EVehicleType IEntity
proto external Managed FindComponent(typename typeName)
proto external void SetOrigin(vector orig)
proto external vector GetAngles()
Same as GetYawPitchRoll(), but returns rotation vector around X, Y and Z axis.
proto external vector GetOrigin()
proto external Physics GetPhysics()
proto external IEntity GetChildren()
proto external BaseWorld GetWorld()
proto external void SetName(string name)
proto external void GetTransform(out vector mat[])
proto external EntityPrefabData GetPrefabData()
proto external IEntity GetParent()
proto external string GetName()
proto external IEntity GetSibling()
Object holding reference to resource. In destructor release the resource.
void OnControllableEntitySpawned(IEntity controlledEntity, notnull SCR_GadgetManagerComponent gadgetManager)
static SCR_ArsenalComponent FindArsenalComponent(notnull IEntity entity, bool getFromSlotted=true)
void SetArsenalEnabled(bool enable, bool isOverwrite=true)
bool PauseGame(bool pause, SCR_EPauseReason reason=SCR_EPauseReason.SYSTEM)
OnPreloadFinishedInvoker GetOnPreloadFinished()
void StartSpawnPreload(vector position)
SCR_Waypoint GetWaypoint(int index=0)
SCR_TutorialStageInfo GetStageInfo()
void StartLoitering(IEntity loiterEntity, int loiteringType, bool holsterWeapon, bool allowRootMotion, bool alignToPosition, vector targetPosition[4]={ "1 0 0", "0 1 0", "0 0 1", "0 0 0" }, bool disableInput=false, SCR_LoiterCustomAnimData customAnimData=SCR_LoiterCustomAnimData.Default)
override void FullHeal(bool ignoreHealingDOT=true)
bool IsBleeding()
the official and globally used way of checking if bleeding tests for any PERSISTENT damage effects of...
array< IEntity > GetQuickSlotEntitiesOnly()
gets all entities in quickslots, and nulls in arrays for non-entity or empty slots
Core component to manage SCR_EditorManagerEntity.
SCR_EditorManagerEntity GetEditorManager()
SCR_InfoDisplay FindInfoDisplay(typename type)
Return hud component of given type.
static SCR_HUDManagerComponent GetHUDManager()
Widget CreateLayout(ResourceName path, EHudLayers layer, int zOrder=0)
static SCR_HintUIInfo CreateInfo(string description, string name, float duration, EHint type, EFieldManualEntryId fieldManualEntry, bool isTimerVisible)
void CloseMap()
Close the map.
bool RequestFaction(Faction faction)
bool RequestLoadout(SCR_BasePlayerLoadout loadout)
SCR_BasePlayerLoadout GetLoadout()
Takes care of dynamic and static onscreen popups.
void PopupMsg(string text, float duration=DEFAULT_DURATION, string text2="", int prio=-1, string param1="", string param2="", string param3="", string param4="", string text2param1="", string text2param2="", string text2param3="", string text2param4="", string sound="", SCR_EPopupMsgFilter category=SCR_EPopupMsgFilter.ALL, WorldTimestamp progressStart=null, WorldTimestamp progressEnd=null)
static const float DEFAULT_DURATION
static SCR_PopUpNotification GetInstance()
static bool IsEmptyOrWhiteSpace(string input)
void SetCanShow(bool canShow)
SCR_ETutorialCourses GetCourseType()
float GetWarningDistance()
IEntity GetFastTravelPosition()
int GetPrefabs(out notnull array< SCR_TutorialCoursePrefabInfo > outArray)
string GetTaskDescription()
float GetCourseBreakDistance()
SCR_ETutorialCourses GetRequiredCourses()
string GetAreaRestrictionEntityOverride()
float GetAreaRestrictionBreakingOverride()
float GetAreaRestrictionWarningOverride()
static void SetLingerDuration(float duration)
How long should subtitles stay visible after the sound ended (seconds).
static SCR_VoiceoverSystem GetInstance()
vector GetPosition()
Get waypoint position. Attached entity is prioritized over static position.
enum EPhysicsLayerPresets Vehicle
IEntity GetOwner()
Owner entity of the fuel tank.
override void EOnDiag(IEntity owner, float timeSlice)
SCR_EditableEntityComponent GetControlledEntity()
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
proto void PrintFormat(string fmt, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL, LogLevel level=LogLevel.NORMAL)
SCR_FieldOfViewSettings Attribute
EEditorMode
Editor mode that defines overall functionality.
EEditorCanOpen
Layers allowing editor to be opened. All of them have to be activated (certain exceptions may apply w...
EntityEvent
Various entity events.
override void OnPlayerRegistered(int playerId)
proto external PlayerController GetPlayerController()