private void DestroyFactoryBotsLoaded(MyMissionBase sender)
        {
            MyScriptWrapper.ActivateSpawnPoints(m_factorySpawns);

            MySmallShipBot mitchel = (MySmallShipBot)MyScriptWrapper.GetEntity("Mitchel");

            MyScriptWrapper.ChangeFaction(mitchel, MyMwcObjectBuilder_FactionEnum.Slavers);
            MyScriptWrapper.SetEntityDestructible(mitchel, true);

            //Support for objective skip
            MySmallShipBot smuggler2 = (MySmallShipBot)MyScriptWrapper.TryGetEntity("Smuggler");

            if (smuggler2 == null)
            {
                Follow1Reached();
                MyEntity spawnPoint = MyScriptWrapper.GetEntity(((uint)EntityID.SpawnpointFactory));
                (spawnPoint as MySpawnPoint).SpawnShip(0);
            }

            MySmallShipBot smuggler = (MySmallShipBot)MyScriptWrapper.GetEntity("Smuggler");

            MyScriptWrapper.ChangeFaction(smuggler, MyMwcObjectBuilder_FactionEnum.Slavers);
            MyScriptWrapper.SetEntityDestructible(smuggler, true);

            MyScriptWrapper.ActivateSpawnPoint((uint)EntityID.SpawnpointGuardL);
            MyScriptWrapper.ActivateSpawnPoint((uint)EntityID.SpawnpointGuardR);
        }
        private void DefendMadelyn_Loaded(MyMissionBase sender)
        {
            MyScriptWrapper.StopTransition(100);
            MyScriptWrapper.ApplyTransition(MyMusicTransitionEnum.DesperateWithStress, 3, "KA03");

            MyScriptWrapper.SetFactionRelation(MyMwcObjectBuilder_FactionEnum.Rainiers, MyMwcObjectBuilder_FactionEnum.Euroamerican, MyFactions.RELATION_WORST);

            var bots = GetBotsFromSpawnpoints(m_barricadeSpawns);

            foreach (var mySmallShipBot in bots)
            {
                if (mySmallShipBot != null)
                {
                    mySmallShipBot.LookTarget = null;
                    MyScriptWrapper.SetEntityDestructible(mySmallShipBot, true);
                }
            }
            var looms = GetBotsFromSpawnpoints(m_barricadeLoomers);

            foreach (var mySmallShipBot in looms)
            {
                if (mySmallShipBot != null)
                {
                    mySmallShipBot.LookTarget = null;
                    MyScriptWrapper.SetEntityDestructible(mySmallShipBot, true);
                }
            }
            MyScriptWrapper.ActivateSpawnPoints(m_barricadeElites);

            ((MyInfluenceSphere)MyScriptWrapper.GetEntity((uint)EntityID.WarSound)).Enabled = true;
        }
        private void ReturnToMadelyn_Loaded(MyMissionBase sender)
        {
            MyScriptWrapper.ApplyTransition(MyMusicTransitionEnum.HeavyFight, 3, "KA19");
            MyScriptWrapper.SetEntitiesEnabled(m_particlesApollo, false);
            MyScriptWrapper.ActivateSpawnPoints(m_barricadeHeavies);

            EveryoneAttackMadelyn();
        }
 private void StartSecurity02Detector(MyEntityDetector sender, MyEntity entity, int meetCriterias)
 {
     if (entity == MySession.PlayerShip)
     {
         MyScriptWrapper.ActivateSpawnPoints(m_spawnsSecurityDetector);
         sender.Off();
     }
 }
        private void MyScriptWrapperOnOnDialogueFinished(MyDialogueEnum dialogue, bool interrupted)
        {
            switch (dialogue)
            {
            case MyDialogueEnum.EAC_AMBUSH_0300_GUYS_HURRY_UP:
                MyScriptWrapper.PlayDialogue(MyDialogueEnum.EAC_AMBUSH_0400_MARCUS_TO_EAC);
                break;

            case MyDialogueEnum.EAC_AMBUSH_0400_MARCUS_TO_EAC:
                if (m_backToMadelyn.IsAvailable())
                {
                    m_backToMadelyn.Success();
                }
                if (m_speakWithPolice.IsAvailable())
                {
                    m_speakWithPolice.Success();
                }
                MyScriptWrapper.ActivateSpawnPoints(m_barricadeSpawns);
                m_speakWithPoliceDialogueFinished = true;
                break;

            case MyDialogueEnum.EAC_AMBUSH_1200_1300:
                MyScriptWrapper.HideEntity(m_ravenGirl);
                MyScriptWrapper.RemoveEntityMark(m_ravenGirl);

                MyScriptWrapper.SetEntitiesEnabled(m_particlesMarcus, false);

                m_marcus.AITemplate = MyBotAITemplates.GetTemplate(MyAITemplateEnum.PASSIVE);
                m_marcus.SetWaypointPath("MarcusRetreat");
                m_marcus.PatrolMode = MyPatrolMode.ONE_WAY;
                m_marcus.Patrol();

                m_ravenGuy.AITemplate = MyBotAITemplates.GetTemplate(MyAITemplateEnum.PASSIVE);
                m_ravenGuy.SetWaypointPath("VitolinoRetreat");
                m_ravenGuy.PatrolMode = MyPatrolMode.ONE_WAY;
                m_ravenGuy.Patrol();

                MyScriptWrapper.PlayDialogue(MyDialogueEnum.EAC_AMBUSH_1500);
                MissionTimer.RegisterTimerAction(30000, MarcusForCrashDialogue, false);
                break;

            case MyDialogueEnum.EAC_AMBUSH_1500:
                //MyScriptWrapper.ApplyTransition(MyMusicTransitionEnum.Special, 3, "LostInTheDistance");
                break;

            case MyDialogueEnum.EAC_AMBUSH_1600:
                //MyScriptWrapper.ApplyTransition(MyMusicTransitionEnum.SadnessOrDesperation, 3, "KA02"); //TODO: change to
                MyScriptWrapper.PlayDialogue(MyDialogueEnum.EAC_AMBUSH_1650);
                MarcusForCrash();
                break;

            case MyDialogueEnum.EAC_AMBUSH_1650:
                Boom();
                break;
            }
        }
        private void BackToMadelyn_Loaded(MyMissionBase sender)
        {
            MyScriptWrapper.ApplyTransition(MyMusicTransitionEnum.StressOrTimeRush, 3, "KA02");
            MyScriptWrapper.ActivateSpawnPoints(m_barricadeSpawns);

            foreach (var particle in m_particlesMarcus)
            {
                MyScriptWrapper.SetParticleEffect(MyScriptWrapper.GetEntity(particle), true);
            }
            foreach (var particle in m_particlesApollo)
            {
                MyScriptWrapper.SetParticleEffect(MyScriptWrapper.GetEntity(particle), true);
            }
            MyScriptWrapper.SetEntitiesEnabled(m_particlesMarcus, true);
            MyScriptWrapper.SetEntitiesEnabled(m_particlesApollo, true);
        }
        private void DestroyGenerator_Loaded(MyMissionBase sender)
        {
            MyScriptWrapper.ActivateSpawnPoints(m_wavesApolloSpawns);
            MyScriptWrapper.ActivateSpawnPoints(m_wavesMarcusSpawns);

            m_marcus.StopFollow();
            m_ravenGuy.StopFollow();

            m_marcus.SetWaypointPath("MarcusLeaved");
            m_marcus.PatrolMode  = MyPatrolMode.ONE_WAY;
            m_marcus.SeeDistance = 250f;
            m_marcus.Patrol();

            m_ravenGuy.SetWaypointPath("VitolinoLeaved");
            m_ravenGuy.SeeDistance = 250f;
            m_ravenGuy.PatrolMode  = MyPatrolMode.ONE_WAY;
            m_ravenGuy.Patrol();

            m_generatorPosition = MyScriptWrapper.GetEntity((uint)EntityID.DestroyGenerator).GetPosition();
            MyScriptWrapper.ActivateSpawnPoints(m_barricadeLoomers);

            MyScriptWrapper.AddNotification(MyScriptWrapper.CreateNotification(MyTextsWrapperEnum.MarcusAndValentinoLeavingParty, MyGuiManager.GetFontMinerWarsGreen(), 10000));
            EveryoneAttackMadelyn();
        }
 private void StartEACDetector(MyEntityDetector sender, MyEntity entity, int meetcriterias)
 {
     MyScriptWrapper.ActivateSpawnPoints(m_EACdetectorSpawns);
 }
 void mothershipBattle_OnMissionLoaded(MyMissionBase sender)
 {
     MyScriptWrapper.ActivateSpawnPoints(m_battleSpawnpoints);
     MyAudio.ApplyTransition(MyMusicTransitionEnum.HeavyFight, 100, "KA19");
 }
示例#10
0
        private void RaceMissonOnCheckpointReached(MyEntity checkPoint, int checkPointNumber)
        {
            if (checkPointNumber + 1 < m_raceGates.Count) // highlight and activate towers on next checkpoint except for last checkpoint
            {
                foreach (var item in m_raceGates[checkPointNumber + 1])
                {
                    MyScriptWrapper.Highlight(item, true, this);
                }
                if (m_raceTowers[checkPointNumber + 1] != null) // only if there are some towers
                {
                    MyScriptWrapper.SetEntitiesEnabled(m_raceTowers[checkPointNumber + 1], true);
                }
            }
            foreach (var item in m_raceGates[checkPointNumber]) // stop highlight and deactivate towers on current checkpoint
            {
                MyScriptWrapper.Highlight(item, false, this);
            }
            if (m_raceTowers[checkPointNumber] != null) // only if there are some towers
            {
                MyScriptWrapper.SetEntitiesEnabled(m_raceTowers[checkPointNumber], false);
            }
            switch (checkPointNumber)
            {
            case 1:
                MyScriptWrapper.PlayDialogue(MyDialogueEnum.JUNKYARD_RETURN_0400);
                break;

            case 2:
                MyScriptWrapper.PlayDialogue(MyDialogueEnum.JUNKYARD_RETURN_0900);
                MyScriptWrapper.PlaySound3D(MyScriptWrapper.GetEntity(m_raceGates[checkPointNumber][0]), MySoundCuesEnum.VocRace05minefields);
                break;

            case 3:
                MyScriptWrapper.ActivateSpawnPoints(m_raceFansSP1);
                MyScriptWrapper.PlayDialogue(MyDialogueEnum.JUNKYARD_RETURN_0800);
                break;

            case 4:
                MyScriptWrapper.ActivateSpawnPoints(m_raceFansSP2);
                MyScriptWrapper.ActivateSpawnPoints(m_raceFansSP3);
                break;

            case 5:
                MyScriptWrapper.ActivateSpawnPoints(m_raceFansSP4);
                break;

            case 6:
                MyScriptWrapper.PlaySound3D(MyScriptWrapper.GetEntity(m_raceGates[checkPointNumber][0]), MySoundCuesEnum.VocRace06speedDuel);
                break;

            case 9:
                MyScriptWrapper.PlaySound3D(MyScriptWrapper.GetEntity(m_raceGates[checkPointNumber][0]), MySoundCuesEnum.VocRace07allThose);
                break;

            case 10:
                MyScriptWrapper.ActivateSpawnPoints(m_raceFansSP5);
                MyScriptWrapper.PlayDialogue(MyDialogueEnum.JUNKYARD_RETURN_1000);
                break;

            case 7:
                MyScriptWrapper.PlayDialogue(MyDialogueEnum.JUNKYARD_RETURN_0600);
                break;

            case 11:
                MyScriptWrapper.PlayDialogue(MyDialogueEnum.JUNKYARD_RETURN_0700);
                break;

            case 12:
                MyScriptWrapper.PlayDialogue(MyDialogueEnum.JUNKYARD_RETURN_1100);
                break;

            case 13:
                MyScriptWrapper.PlaySound3D(MyScriptWrapper.GetEntity(m_raceGates[checkPointNumber][0]), MySoundCuesEnum.VocRace08moving);
                break;

            case 15:
                MyScriptWrapper.PlaySound3D(MyScriptWrapper.GetEntity(m_raceGates[checkPointNumber][0]), MySoundCuesEnum.VocRace10inside);
                break;

            case 18:
                MyScriptWrapper.PlayDialogue(MyDialogueEnum.JUNKYARD_RETURN_1200);
                MyScriptWrapper.PlaySound3D(MyScriptWrapper.GetEntity(m_raceGates[checkPointNumber][0]), MySoundCuesEnum.VocRace11wire);
                break;
            }
        }