public override void Load() { //if (!IsMainSector) return; MyScriptWrapper.OnSpawnpointBotSpawned += MyScriptWrapperOnOnSpawnpointBotSpawned; MyScriptWrapper.EntityDeath += OnEntityDeath; MyGuiScreenGamePlay.Static.CameraContrlolledObjectChanged += Static_CameraContrlolledObjectChanged; m_templarBot = (MySmallShipBot)MyScriptWrapper.GetEntity((uint)EntityID.BotTemplar); m_royalBot = (MySmallShipBot)MyScriptWrapper.GetEntity((uint)EntityID.BotRoyal); m_templarBot.SetWaypointPath("Templar"); m_templarBot.PatrolMode = MyPatrolMode.CYCLE; m_templarBot.SpeedModifier = 0.25f; m_templarBot.Patrol(); m_royalBot.SetWaypointPath("Royal"); m_royalBot.PatrolMode = MyPatrolMode.CYCLE; m_royalBot.SpeedModifier = 0.25f; m_royalBot.Patrol(); m_ravenguyBot = MyScriptWrapper.GetEntity("RavenGuy") as MySmallShipBot; m_ravengirlBot = MyScriptWrapper.GetEntity("RavenGirl") as MySmallShipBot; m_marcus = MyScriptWrapper.GetEntity("Marcus") as MySmallShipBot; MyScriptWrapper.UnhideEntity(MyScriptWrapper.GetEntity((uint)EntityID.BotTemplar)); m_deadlyScanners = new MyDeadlyScanners(m_scanners1IDs, new List <int>() { 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000 }); if (!MyScriptWrapper.IsMissionFinished(m_disableScanner2.ID)) { Components.Add(m_deadlyScanners); } DisableEntities(new List <uint>() { (uint)EntityID.Scanner1, (uint)EntityID.Scanner2 }); foreach (var mine in m_minesDummies) { MyScriptWrapper.GenerateMinesField <MyMineBasic>(MyScriptWrapper.GetEntity(mine), MyMwcObjectBuilder_FactionEnum.Russian_KGB, 1, MyTexts.Mine, MyHudIndicatorFlagsEnum.SHOW_BORDER_INDICATORS | MyHudIndicatorFlagsEnum.ALPHA_CORRECTION_BY_DISTANCE | MyHudIndicatorFlagsEnum.SHOW_TEXT | MyHudIndicatorFlagsEnum.SHOW_DISTANCE | MyHudIndicatorFlagsEnum.SHOW_FACTION_RELATION_MARKER | MyHudIndicatorFlagsEnum.SHOW_ONLY_IF_DETECTED_BY_RADAR ); } if (MySession.Static.EventLog.IsMissionFinished(MyMissionID.FORT_VALIANT_C_FOLLOW_FIND_VENTILATION) && !MySession.Static.EventLog.IsMissionFinished(MyMissionID.FORT_VALIANT_C_CATACOMBS)) { SetFriendsPatrol(); } if (!MyMissions.GetMissionByID(MyMissionID.FORT_VALIANT_C_CAPTAIN).IsCompleted()) { var startPosition = MyScriptWrapper.GetEntity((uint)EntityID.StartLocationC).GetPosition(); MyScriptWrapper.Move(MyScriptWrapper.GetEntity(MyActorConstants.GetActorName(MyActorEnum.MADELYN)), startPosition); MyScriptWrapper.MovePlayerAndFriendsToHangar(this.RequiredActors); } base.Load(); }
public override void Load() { //if (!IsMainSector) return; MyScriptWrapper.OnSpawnpointBotSpawned += MyScriptWrapperOnOnSpawnpointBotSpawned; MyScriptWrapper.EntityDeath += OnEntityDeath; MyGuiScreenGamePlay.Static.CameraContrlolledObjectChanged += Static_CameraContrlolledObjectChanged; m_templarBot = (MySmallShipBot)MyScriptWrapper.GetEntity((uint)EntityID.BotTemplar); m_royalBot = (MySmallShipBot)MyScriptWrapper.GetEntity((uint)EntityID.BotRoyal); m_templarBot.SetWaypointPath("Templar"); m_templarBot.PatrolMode = MyPatrolMode.CYCLE; m_templarBot.SpeedModifier = 0.25f; m_templarBot.Patrol(); m_royalBot.SetWaypointPath("Royal"); m_royalBot.PatrolMode = MyPatrolMode.CYCLE; m_royalBot.SpeedModifier = 0.25f; m_royalBot.Patrol(); m_ravenguyBot = MyScriptWrapper.GetEntity("RavenGuy") as MySmallShipBot; m_ravengirlBot = MyScriptWrapper.GetEntity("RavenGirl") as MySmallShipBot; m_marcus = MyScriptWrapper.GetEntity("Marcus") as MySmallShipBot; MyScriptWrapper.UnhideEntity(MyScriptWrapper.GetEntity((uint)EntityID.BotTemplar)); m_deadlyScanners = new MyDeadlyScanners(m_scanners1IDs, new List<int>() { 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000 }); if (!MyScriptWrapper.IsMissionFinished(m_disableScanner2.ID)) Components.Add(m_deadlyScanners); DisableEntities(new List<uint>() { (uint)EntityID.Scanner1, (uint)EntityID.Scanner2 }); foreach (var mine in m_minesDummies) { MyScriptWrapper.GenerateMinesField<MyMineBasic>(MyScriptWrapper.GetEntity(mine), MyMwcObjectBuilder_FactionEnum.Russian_KGB, 1, MyTexts.Mine, MyHudIndicatorFlagsEnum.SHOW_BORDER_INDICATORS | MyHudIndicatorFlagsEnum.ALPHA_CORRECTION_BY_DISTANCE | MyHudIndicatorFlagsEnum.SHOW_TEXT | MyHudIndicatorFlagsEnum.SHOW_DISTANCE | MyHudIndicatorFlagsEnum.SHOW_FACTION_RELATION_MARKER | MyHudIndicatorFlagsEnum.SHOW_ONLY_IF_DETECTED_BY_RADAR ); } if (MySession.Static.EventLog.IsMissionFinished(MyMissionID.FORT_VALIANT_C_FOLLOW_FIND_VENTILATION) && !MySession.Static.EventLog.IsMissionFinished(MyMissionID.FORT_VALIANT_C_CATACOMBS)) { SetFriendsPatrol(); } if (!MyMissions.GetMissionByID(MyMissionID.FORT_VALIANT_C_CAPTAIN).IsCompleted()) { var startPosition = MyScriptWrapper.GetEntity((uint)EntityID.StartLocationC).GetPosition(); MyScriptWrapper.Move(MyScriptWrapper.GetEntity(MyActorConstants.GetActorName(MyActorEnum.MADELYN)), startPosition); MyScriptWrapper.MovePlayerAndFriendsToHangar(this.RequiredActors); } base.Load(); }