public override void Load() // Code in that block will be called on the load of the sector
        {
            base.Load();

            m_Detector1 = MyScriptWrapper.GetDetector(MyScriptWrapper.GetEntity((uint)EntityID.Detector1));
            m_Detector1.OnEntityEnter += Detector1Action;
            m_Detector1.On();

            m_Detector2 = MyScriptWrapper.GetDetector(MyScriptWrapper.GetEntity((uint)EntityID.Detector2));
            m_Detector2.OnEntityEnter += Detector2Action;
            m_Detector2.On();

            m_Detector3 = MyScriptWrapper.GetDetector(MyScriptWrapper.GetEntity((uint)EntityID.Detector3));
            m_Detector3.OnEntityEnter += Detector3Action;
            m_Detector3.On();

            m_Detector4 = MyScriptWrapper.GetDetector(MyScriptWrapper.GetEntity((uint)EntityID.Detector4));
            m_Detector4.OnEntityEnter += Detector4Action;
            m_Detector4.On();



            MyScriptWrapper.ApplyTransition(MyMusicTransitionEnum.HeavyFight, 3); // Sets music group to be played in the sector - no matter if the mission is running or not
            MyScriptWrapper.SetPlayerFaction(MyMwcObjectBuilder_FactionEnum.Rainiers);
        }
Пример #2
0
        void O12BRFightLoaded(MyMissionBase sender)
        {
            m_valentin = (MySmallShipBot)MyScriptWrapper.GetEntity("RavenGuy");
            MyScriptWrapper.ApplyTransition(MyMusicTransitionEnum.HeavyFight, 3, "KA03");
            MyScriptWrapper.Follow(MySession.PlayerShip, m_marcus);
            MyScriptWrapper.Follow(MySession.PlayerShip, m_tarja);
            MyScriptWrapper.Follow(MySession.PlayerShip, m_valentin);
            m_marcus.SpeedModifier = 1.0f;

            MyScriptWrapper.ChangeFaction((uint)EntityID.BR_SP_Boss, MyMwcObjectBuilder_FactionEnum.Slavers);
            foreach (var bot in MyScriptWrapper.GetSpawnPointBots((uint)EntityID.BR_SP_Boss))
            {
                if (bot.Ship != null)
                {
                    MyScriptWrapper.SetEntityDestructible(bot.Ship, true);
                    MyScriptWrapper.ChangeFaction(bot.Ship, MyMwcObjectBuilder_FactionEnum.Slavers);
                }
            }

            foreach (var spawn in m_spawns)
            {
                MyScriptWrapper.ChangeFaction(spawn, MyMwcObjectBuilder_FactionEnum.Slavers);
                foreach (var bot in MyScriptWrapper.GetSpawnPointBots(spawn))
                {
                    if (bot.Ship != null)
                    {
                        MyScriptWrapper.SetEntityDestructible(bot.Ship, true);
                        MyScriptWrapper.ChangeFaction(bot.Ship, MyMwcObjectBuilder_FactionEnum.Slavers);
                    }
                }
            }
        }
Пример #3
0
        void O04FollowSmugglerSuccess(MyMissionBase sender)
        {
            MyScriptWrapper.StopTransition(3);
            MyScriptWrapper.ApplyTransition(MyMusicTransitionEnum.CalmAtmosphere, 1, "KA03");

            foreach (var spawn in new List <uint> {
                (uint)EntityID.SP_Find_1, (uint)EntityID.SP_Find_2, (uint)EntityID.SP_Find_3
            })
            {
                MyScriptWrapper.ChangeFaction(spawn, MyMwcObjectBuilder_FactionEnum.Slavers);
                foreach (var bot in MyScriptWrapper.GetSpawnPointBots(spawn))
                {
                    if (bot.Ship != null)
                    {
                        MyScriptWrapper.ChangeFaction(bot.Ship, MyMwcObjectBuilder_FactionEnum.Traders);
                    }
                }
            }

            m_manjeet.Idle();

            foreach (var spawn in new List <uint> {
                (uint)EntityID.MomoGangMember1, (uint)EntityID.MomoGangMember2
            })
            {
                MyScriptWrapper.UnhideEntity(MyScriptWrapper.GetEntity(spawn));
            }
        }
        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;
        }
Пример #5
0
        void O10FindBombDealerLoaded(MyMissionBase sender)
        {
            m_manjeet.LookTarget = null;
            MyScriptWrapper.ApplyTransition(MyMusicTransitionEnum.Special, 1, "MM01");
            MyScriptWrapper.SetSleepDistance(m_marcus, 5000);
            MyScriptWrapper.StopFollow(m_marcus);
            m_marcus.SetWaypointPath("MarcusOut");
            m_marcus.SpeedModifier = 2.0f;
            MyScriptWrapper.AddNotification(MyScriptWrapper.CreateNotification(MyTextsWrapperEnum.MarcusIsLeavingForTarja, MyGuiManager.GetFontMinerWarsGreen(), 5000));
            m_marcus.PatrolMode = MyPatrolMode.ONE_WAY;
            m_marcus.Patrol();

            m_valentin = (MySmallShipBot)MyScriptWrapper.GetEntity("RavenGuy");
            m_valentin.LeaderLostEnabled = true;
            MyScriptWrapper.MarkEntity(m_valentin, MyTextsWrapper.Get(MyActorConstants.GetActorDisplayName(MyActorEnum.VALENTIN)).ToString(), HUD.MyHudIndicatorFlagsEnum.SHOW_DISTANCE | HUD.MyHudIndicatorFlagsEnum.SHOW_ONLY_IF_DETECTED_BY_RADAR | HUD.MyHudIndicatorFlagsEnum.SHOW_TEXT | HUD.MyHudIndicatorFlagsEnum.SHOW_BORDER_INDICATORS, HUD.MyGuitargetMode.Friend);
            MyScriptWrapper.StopFollow(m_valentin);
            MyEntity valentinPosition = MyScriptWrapper.GetEntity((uint)EntityID.ValentinBRPosition);

            m_valentin.SetWorldMatrix(valentinPosition.WorldMatrix);

            m_tarja.LeaderLostEnabled = true;
            MyScriptWrapper.StopFollow(m_tarja);
            MyScriptWrapper.MarkEntity(m_tarja, MyTextsWrapper.Get(MyActorConstants.GetActorDisplayName(MyActorEnum.TARJA)).ToString(), HUD.MyHudIndicatorFlagsEnum.SHOW_DISTANCE | HUD.MyHudIndicatorFlagsEnum.SHOW_ONLY_IF_DETECTED_BY_RADAR | HUD.MyHudIndicatorFlagsEnum.SHOW_TEXT | HUD.MyHudIndicatorFlagsEnum.SHOW_BORDER_INDICATORS, HUD.MyGuitargetMode.Friend);
            MyEntity tarjaPosition = MyScriptWrapper.GetEntity((uint)EntityID.TarjaBRPosition);

            m_tarja.SetWorldMatrix(tarjaPosition.WorldMatrix);
            MyScriptWrapper.SetEntityDisplayName(m_tarja, MyTextsWrapper.Get(MyTextsWrapperEnum.Actor_Tarja).ToString());

            MyScriptWrapper.UnhideEntity(MyScriptWrapper.GetEntity((uint)EntityID.BombDealer));
        }
 void MyScriptWrapper_OnSentenceStarted(MyDialogueEnum dialogue, MyDialoguesWrapperEnum sentence)
 {
     if (dialogue == MyDialogueEnum.EAC_AMBUSH_0400_MARCUS_TO_EAC && sentence == MyDialoguesWrapperEnum.Dlg_JunkyardEacAmbush_0407)
     {
         MyScriptWrapper.ApplyTransition(MyMusicTransitionEnum.Special, 3, "KA16");
     }
 }
Пример #7
0
        void OnMusicTransition(ref MyEventMusicTransition msg)
        {
            switch (msg.MusicEventType)
            {
            case MyMusicEventEnum.STOP_MUSIC:
                MyScriptWrapper.StopMusic();
                break;

            case MyMusicEventEnum.STOP_TRANSITION:
                MyScriptWrapper.StopTransition(msg.Priority);
                break;

            case MyMusicEventEnum.APPLY_TRANSITION:
            {
                var transition = (MyMusicTransitionEnum)msg.TransitionEnum;

                if (!MyMwcEnums.IsValidValue(transition))
                {
                    Alert("Invalid MyMusicTransitionEnum", msg.SenderEndpoint, msg.EventType);
                    return;
                }

                MyScriptWrapper.ApplyTransition(transition, msg.Priority, msg.Category);
            }
            break;

            default:
                Alert("Unknown music transition type", msg.SenderEndpoint, msg.EventType);
                break;
            }
        }
Пример #8
0
        public override void Load()
        {
            base.Load();

            // Add Fourth Reich FalseId to inventory if player already haven't got one
            //MyScriptWrapper.AddFalseIdToPlayersInventory(MyMwcObjectBuilder_FactionEnum.FourthReich);

            // Set musicmood right from script start
            MyScriptWrapper.ApplyTransition(MyMusicTransitionEnum.DesperateWithStress);

            // Change player faction to Rainiers and set relations between them
            MyScriptWrapper.SetPlayerFaction(MyMwcObjectBuilder_FactionEnum.Rainiers);
            MyScriptWrapper.SetFactionRelation(MyMwcObjectBuilder_FactionEnum.Rainiers, MyMwcObjectBuilder_FactionEnum.Euroamerican, MyFactions.RELATION_WORST);
            MyScriptWrapper.SetFactionRelation(MyMwcObjectBuilder_FactionEnum.Euroamerican, MyMwcObjectBuilder_FactionEnum.Rainiers, MyFactions.RELATION_WORST);
            MyScriptWrapper.FixBotNames();

            MyScriptWrapper.TryHide((uint)EntityID.TurretAutodescrut1);
            MyScriptWrapper.TryHide((uint)EntityID.TurretAutodescrut2);
            MyScriptWrapper.TryHide((uint)EntityID.TurretAutodescrut3);
            MyScriptWrapper.TryHide((uint)EntityID.TurretAutodescrut4);

            MyScriptWrapper.TryHide((uint)EntityID.CargoRepair);

            // Add hacking tool to inventory if player already haven't got one
            MyScriptWrapper.AddHackingToolToPlayersInventory(2);


            MyScriptWrapper.EntityDeath += MyScriptWrapper_EntityDeath;
        }
        public override void Load() // Code in that block will be called on the load of the sector
        {
            base.Load();

            MyScriptWrapper.ApplyTransition(MyMusicTransitionEnum.HeavyFight, 3); // Sets music group to be played in the sector - no matter if the mission is running or not

            TimeSpan respawnTime = TimeSpan.FromSeconds(60);

            MyScriptWrapper.SetCargoRespawn((uint)EntityID.Cargo1, respawnTime);
            MyScriptWrapper.SetCargoRespawn((uint)EntityID.Cargo2, respawnTime);
            MyScriptWrapper.SetCargoRespawn((uint)EntityID.Cargo3, respawnTime);
            MyScriptWrapper.SetCargoRespawn((uint)EntityID.Cargo4, respawnTime);
            MyScriptWrapper.SetCargoRespawn((uint)EntityID.Cargo5, respawnTime);
            MyScriptWrapper.SetCargoRespawn((uint)EntityID.Cargo6, respawnTime);
            MyScriptWrapper.SetCargoRespawn((uint)EntityID.Cargo7, respawnTime);
            MyScriptWrapper.SetCargoRespawn((uint)EntityID.Cargo8, respawnTime);
            MyScriptWrapper.SetCargoRespawn((uint)EntityID.Cargo9, respawnTime);
            MyScriptWrapper.SetCargoRespawn((uint)EntityID.Cargo10, respawnTime);
            MyScriptWrapper.SetCargoRespawn((uint)EntityID.Cargo11, respawnTime);
            MyScriptWrapper.SetCargoRespawn((uint)EntityID.Cargo12, respawnTime);


            m_Detector1 = MyScriptWrapper.GetDetector(MyScriptWrapper.GetEntity((uint)EntityID.Detector1));
            m_Detector1.OnEntityEnter += Detector1Action;
            m_Detector1.On();

            m_Detector2 = MyScriptWrapper.GetDetector(MyScriptWrapper.GetEntity((uint)EntityID.Detector2));
            m_Detector2.OnEntityEnter += Detector2Action;
            m_Detector2.On();

            m_Detector3 = MyScriptWrapper.GetDetector(MyScriptWrapper.GetEntity((uint)EntityID.Detector3));
            m_Detector3.OnEntityEnter += Detector3Action;
            m_Detector3.On();
        }
Пример #10
0
 public override void Load() // Code in that block will be called on the load of the sector
 {
     base.Load();
     MyScriptWrapper.ApplyTransition(MyMusicTransitionEnum.HeavyFight, 3);
     m_oldRelation = MyFactions.GetFactionsStatus(MyMwcObjectBuilder_FactionEnum.Rainiers, MyMwcObjectBuilder_FactionEnum.Russian);
     MyScriptWrapper.SetFactionRelation(MyMwcObjectBuilder_FactionEnum.Rainiers, MyMwcObjectBuilder_FactionEnum.Russian, MyFactions.RELATION_WORST);
 }
Пример #11
0
        public override void Load() // Code in that block will be called on the load of the sector
        {
            base.Load();
            MyScriptWrapper.ApplyTransition(MyMusicTransitionEnum.CalmAtmosphere); // Sets music group to be played in the sector - no matter if the mission is running or not

            MyScriptWrapper.FixBotNames();
        }
Пример #12
0
        public override void Load()
        {
            base.Load();
            MyScriptWrapper.SetEntityPriority(MyScriptWrapper.GetEntity((uint)EntityId.DestroySlaverRidersShip1), -1);
            MyScriptWrapper.SetEntityPriority(MyScriptWrapper.GetEntity((uint)EntityId.DestroySlaverRidersShip2), -1);
            MyScriptWrapper.SetEntityPriority(MyScriptWrapper.GetEntity((uint)EntityId.StopSlaverTransportShip1), -1);
            MyScriptWrapper.SetEntityPriority(MyScriptWrapper.GetEntity((uint)EntityId.StopSlaverTransportShip2), -1);

            MyScriptWrapper.SetEntityDestructible(MyScriptWrapper.GetEntity((int)EntityId.StopSlaverTransportShip1), false);
            MyScriptWrapper.SetEntityDestructible(MyScriptWrapper.GetEntity((int)EntityId.StopSlaverTransportShip2), false);


            MyScriptWrapper.SetFactionRelation(MyMwcObjectBuilder_FactionEnum.Rainiers, MyMwcObjectBuilder_FactionEnum.Slavers, MyFactions.RELATION_WORST);
            MyScriptWrapper.SetFactionRelation(MyMwcObjectBuilder_FactionEnum.Rainiers, MyMwcObjectBuilder_FactionEnum.Pirates, MyFactions.RELATION_BEST);


            MyScriptWrapper.EntityDeath            += Script_EntityDeath;
            MyScriptWrapper.OnEntityAtacked        += Script_EntityAtacked;
            MyScriptWrapper.OnSpawnpointBotSpawned += Script_SpawnpointBotSpawned;
            MyScriptWrapper.OnDialogueFinished     += Script_DialogueFinished;


            MyScriptWrapper.ApplyTransition(MyMusicTransitionEnum.CalmAtmosphere);

            m_repairPipesDummyShoot = MyScriptWrapper.GetEntity((uint)EntityId.StabilizeGasPipesShootDetector);
            m_repairedCounter       = 0;
        }
        public override void Load() // Code in that block will be called on the load of the sector
        {
            base.Load();
            MyScriptWrapper.ApplyTransition(MyMusicTransitionEnum.HeavyFight, 3); // Sets music group to be played in the sector - no matter if the mission is running or not

            m_oldRelation = MyFactions.GetFactionsStatus(MyMwcObjectBuilder_FactionEnum.Russian, MyMwcObjectBuilder_FactionEnum.Russian_KGB);
            MyScriptWrapper.SetFactionRelation(MyMwcObjectBuilder_FactionEnum.Russian, MyMwcObjectBuilder_FactionEnum.Russian_KGB, MyFactions.RELATION_WORST);
        }
 private void M11TalkToReefOnOnMissionLoaded(MyMissionBase sender)
 {
     m_marcus.Follow(MySession.PlayerShip);
     m_ravenguyBot.Follow(MySession.PlayerShip);
     m_ravengirlBot.Follow(MySession.PlayerShip);
     MyScriptWrapper.ApplyTransition(MyMusicTransitionEnum.Victory, 3, "KA02");
     m_reef.LookTarget = MySession.PlayerShip;
 }
Пример #15
0
 void O06KillWavesLoaded(MyMissionBase sender)
 {
     //MyScriptWrapper.PlayDialogue(MyDialogueEnum.JUNKYARD_CONVINCE_0700_ALMOST_THERE);
     m_manjeet.Idle();
     m_manjeet.SetWorldMatrix(MyScriptWrapper.GetEntity((uint)EntityID.ManjeetFinalPosition).WorldMatrix);
     MyScriptWrapper.ApplyTransition(MyMusicTransitionEnum.LightFight, 3, "MM01");
     MyScriptWrapper.OnSpawnpointBotSpawned += OnSpawnpointBotSpawned;
 }
        private void ReturnToMadelyn_Loaded(MyMissionBase sender)
        {
            MyScriptWrapper.ApplyTransition(MyMusicTransitionEnum.HeavyFight, 3, "KA19");
            MyScriptWrapper.SetEntitiesEnabled(m_particlesApollo, false);
            MyScriptWrapper.ActivateSpawnPoints(m_barricadeHeavies);

            EveryoneAttackMadelyn();
        }
Пример #17
0
 private void OnFindCircuitLoaded(MyMissionBase sender)
 {
     MyScriptWrapper.ApplyTransition(MyMusicTransitionEnum.LightFight, 100, "KA27");
     MyScriptWrapper.Highlight((uint)EntityID.CargoIDCard, true, this);
     MyScriptWrapper.ActivateSpawnPoint(72524);
     MyScriptWrapper.DisableShip(MyScriptWrapper.GetEntity(75066));
     MyScriptWrapper.SetEntityEnabled((uint)EntityID.CargoIDCard, false);
 }
        private void M08CollectIllegalCargoOnOnMissionLoaded(MyMissionBase sender)
        {
            foreach (var box in m_boxes)
            {
                MyScriptWrapper.Highlight(box, true, this);
            }

            MyScriptWrapper.ApplyTransition(MyMusicTransitionEnum.LightFight, 3, "KA08");
        }
Пример #19
0
 void O04FollowSmugglerLoaded(MyMissionBase sender)
 {
     m_manjeetFindDetector.OnEntityEnter -= ManjeetFound;
     m_manjeetFindDetector.Off();
     m_manjeet.SetWaypointPath("SmugglerRun");
     m_manjeet.PatrolMode = MyPatrolMode.ONE_WAY;
     m_manjeet.Patrol();
     MyScriptWrapper.ApplyTransition(MyMusicTransitionEnum.StressOrTimeRush, 3, "MM01");
 }
 public override void Load() // Code in that block will be called on the load of the sector
 {
     base.Load();
     m_slaverCaptainTalked = false;
     m_slavesFreed         = 0;
     MyScriptWrapper.ApplyTransition(MyMusicTransitionEnum.StressOrTimeRush); // Sets music group to be played in the sector - no matter if the mission is running or not
     MyScriptWrapper.EntityDeath += MyScriptWrapperOnEntityDeath;
     MyScriptWrapper.EnsureInventoryItem(MyScriptWrapper.GetCentralInventory(), MyMwcObjectBuilderTypeEnum.SmallShip_HackingTool, (int)MyMwcObjectBuilder_SmallShip_HackingTool_TypesEnum.Level_2);
 }
Пример #21
0
        void MSEscape(MyMissionBase sender)
        {
            foreach (var Door in m_openedddoors)
            {
                MyScriptWrapper.UnhideEntity(MyScriptWrapper.GetEntity(Door));
            }
            foreach (var Door in m_closeddoors)
            {
                MyScriptWrapper.HideEntity(MyScriptWrapper.GetEntity(Door));
            }
            foreach (var spawn in m_pilotsSpawn)
            {
                foreach (var bot in MyScriptWrapper.GetSpawnPointBots(spawn))
                {
                    if (bot.Ship != null) // If bots are already spawned
                    {
                        if (!bot.Ship.IsDead())
                        {
                            bot.Ship.MarkForClose();
                        }
                    }
                }
            }

            foreach (var Entity in m_closeentiites)
            {
                var item = MyScriptWrapper.TryGetEntity(Entity);
                if (item != null)
                {
                    item.MarkForClose();
                }
                MyScriptWrapper.ApplyTransition(MyMusicTransitionEnum.Victory, 3);
            }
            MyScriptWrapper.SetEntityPriority(MyScriptWrapper.GetEntity((uint)EntityID.Mothership_container), -1);
            foreach (var Entity in m_PC)
            {
                var item = MyScriptWrapper.TryGetEntity(Entity);
                if (item != null)
                {
                    item.MarkForClose();
                }
            }


            MyScriptWrapper.UnhideEntity(MyScriptWrapper.GetEntity((uint)EntityID.Hide_Doors_1));
            MyScriptWrapper.UnhideEntity(MyScriptWrapper.GetEntity((uint)EntityID.Hide_Doors_2));
            MyScriptWrapper.UnhideEntity(MyScriptWrapper.GetEntity((uint)EntityID.Hide_Doors_3));
            MyScriptWrapper.UnhideEntity(MyScriptWrapper.GetEntity((uint)EntityID.Hide_Doors_4));
            MyScriptWrapper.HideEntity(MyScriptWrapper.GetEntity((uint)EntityID.Hidden_Doors_1));
            MyScriptWrapper.HideEntity(MyScriptWrapper.GetEntity((uint)EntityID.Hidden_Doors_2));
            MyScriptWrapper.HideEntity(MyScriptWrapper.GetEntity((uint)EntityID.Hidden_Doors_3));
            foreach (var Doors in m_doors)
            {
                MyScriptWrapper.UnhideEntity(MyScriptWrapper.GetEntity(Doors));
            }
        }
Пример #22
0
 void O05GetCloserToEnemyLoaded(MyMissionBase sender)
 {
     MyScriptWrapper.StopTransition(3);
     MyScriptWrapper.ApplyTransition(MyMusicTransitionEnum.DesperateWithStress, 1, "KA01");
     //smuggler.SetWaypointPath("SmugglerRun2");
     m_manjeet.PatrolMode = MyPatrolMode.ONE_WAY;
     m_manjeet.Patrol();
     m_manjeet.LookTarget = null;
     MissionTimer.RegisterTimerAction(10000, StartPathDialogue, false);
 }
Пример #23
0
 void O01FindInformatorLoaded(MyMissionBase sender)
 {
     MyScriptWrapper.StopFollow(m_tarja);
     MyScriptWrapper.Move(m_tarja, MyScriptWrapper.GetEntity((uint)EntityID.TarjaInitialPosition).GetPosition());
     MyScriptWrapper.Move(m_manjeet, MyScriptWrapper.GetEntity((uint)EntityID.SmugglerStart).GetPosition());
     MyScriptWrapper.ApplyTransition(MyMusicTransitionEnum.CalmAtmosphere, 1, "KA02");
     MyScriptWrapper.HideEntity(m_manjeet);
     MyScriptWrapper.ActivateSpawnPoint((uint)EntityID.SP_Find_1);
     MyScriptWrapper.ActivateSpawnPoint((uint)EntityID.SP_Find_2);
     MyScriptWrapper.ActivateSpawnPoint((uint)EntityID.SP_Find_3);
 }
 void O01FlyTowardsMadelynSuccess(MyMissionBase sender)
 {
     MyScriptWrapper.ApplyTransition(MyMusicTransitionEnum.HeavyFight, 3, "KA03");
     MyScriptWrapper.ActivateSpawnPoint((uint)EntityID.SpawnLastAsteroid);
     MyScriptWrapper.PlayDialogue(MyDialogueEnum.CHINESE_ESCAPE_0900_KILL_THOSE_BASTARDS);
     MissionTimer.RegisterTimerAction(15000, ExplosionLastAsteroid1, false);
     MyScriptWrapper.SetParticleEffect(MyScriptWrapper.GetEntity((uint)EntityID.ExplosionParticleLeft1), true);
     MyScriptWrapper.PlaySound3D(MySession.PlayerShip, MySoundCuesEnum.SfxShipLargeExplosion);
     MyScriptWrapper.ActivateSpawnPoint((uint)EntityID.SpawnLastL);
     MyScriptWrapper.ActivateSpawnPoint((uint)EntityID.SpawnLastR);
 }
Пример #25
0
 void Escape2MSSuccess(MyMissionBase sender)
 {
     MyScriptWrapper.ActivateSpawnPoint((uint)EntityID.Escape_Spawn1);
     MyScriptWrapper.ActivateSpawnPoint((uint)EntityID.Escape_Spawn2);
     MyScriptWrapper.ActivateSpawnPoint((uint)EntityID.Escape_Spawn3);
     MyScriptWrapper.ActivateSpawnPoint((uint)EntityID.Escape_Spawn4);
     MyScriptWrapper.ActivateSpawnPoint((uint)EntityID.CIC_Charge);
     MyScriptWrapper.ApplyTransition(MyMusicTransitionEnum.StressOrTimeRush);
     MyScriptWrapper.Follow(MySession.PlayerShip, m_ravengirl);
     MyScriptWrapper.Follow(MySession.PlayerShip, m_ravenguy);
     MyScriptWrapper.StopTransition(3);
 }
Пример #26
0
        void MyScriptWrapper_OnSentenceStarted(MyDialogueEnum dialogue, MyDialoguesWrapperEnum sentence)
        {
            if (dialogue == MyDialogueEnum.EAC_PRISON_1200 && sentence == MyDialoguesWrapperEnum.Dlg_EACPrison_1200)
            {
                MyScriptWrapper.ApplyTransition(MyMusicTransitionEnum.Special, 100, "KA13");
            }

            if (dialogue == MyDialogueEnum.EAC_PRISON_1250 && sentence == MyDialoguesWrapperEnum.Dlg_EACPrison_1210)
            {
                MyScriptWrapper.ApplyTransition(MyMusicTransitionEnum.HeavyFight, 100, "KA16");
            }
        }
Пример #27
0
            public override void Load()
            {
                base.Load();
                MyScriptWrapper.ApplyTransition(MyMusicTransitionEnum.CalmAtmosphere); // Sets music group to be played in the sector - no matter if the mission is running or not
                m_botDetector = MyScriptWrapper.GetDetector(m_botDetectorId);
                m_botDetector.On();
                m_botDetector.OnEntityEnter += m_botDetector_OnEntityEnter;
                m_botToTalk = MyScriptWrapper.GetEntity(m_botToTalkId) as MySmallShipBot;
                m_botToTalk.SpeedModifier = 0.25f;
                SetPatrolMode();

                Debug.Assert(m_botToTalk != null);
            }
        private void MyScriptWrapper_OnDialogueFinished(MyDialogueEnum dialogue, bool interrupted)
        {
            if (dialogue == MyDialogueEnum.CHINESE_ESCAPE_0100_INTRODUCTION)
            {
                MyScriptWrapper.PlayDialogue(MyDialogueEnum.CHINESE_ESCAPE_0200_IT_IS_TRAP);
            }
            else
            if (dialogue == MyDialogueEnum.CHINESE_ESCAPE_0200_IT_IS_TRAP)
            {
                MyScriptWrapper.SetFactionRelation(MyMwcObjectBuilder_FactionEnum.Rainiers, MyMwcObjectBuilder_FactionEnum.China, MyFactions.RELATION_WORST);
                MyScriptWrapper.ApplyTransition(MyMusicTransitionEnum.HeavyFight, 3, "MM01");

                m_motherShipSpeed = MOTHERSHIP_FULLSPEED;

                foreach (var spawn in m_spawnCompanions)
                {
                    MyScriptWrapper.ChangeFaction(spawn, MyMwcObjectBuilder_FactionEnum.China);
                    foreach (var bot in MyScriptWrapper.GetSpawnPointBots(spawn))
                    {
                        if (bot.Ship != null)
                        {
                            MyScriptWrapper.ChangeFaction(bot.Ship.EntityId.Value.NumericValue, MyMwcObjectBuilder_FactionEnum.China);
                            bot.Ship.SpeedModifier = 1f;
                            MyScriptWrapper.SetEntityDestructible(bot.Ship, true);

                            m_attackerBots.Add(bot.Ship);
                        }
                    }
                }


                m_detectorFirst.Off();
                m_detectorFirst.OnEntityEnter  -= DetectorActionFirst;
                m_detectorSecond.OnEntityEnter += DetectorActionSecond;
                m_detectorSecond.On();

                m_reassignBotTargets = true;
                //AssignTargetsToBots();

                MyScriptWrapper.AddNotification(MyScriptWrapper.CreateNotification(
                                                    MyTextsWrapperEnum.WatchMothershipHealth,
                                                    MyHudConstants.ENEMY_FONT,
                                                    8000,
                                                    null));
            }
            else if (dialogue == MyDialogueEnum.CHINESE_ESCAPE_0300_ON_THIRD)
            {
                MyScriptWrapper.PlayDialogue(MyDialogueEnum.CHINESE_ESCAPE_0400_ON_NINE);
            }
        }
Пример #29
0
        /*   void FreeMothershipMSSuccess(MyMissionBase sender)
         * {
         *     MyScriptWrapper.ActivateSpawnPoint((uint)EntityID.Mothership_Spawn_1);
         *     MyScriptWrapper.ActivateSpawnPoint((uint)EntityID.Mothership_Spawn_2);
         *     MyScriptWrapper.ActivateSpawnPoint((uint)EntityID.Mothership_Spawn_3);
         *     sender.OnMissionSuccess -= FreeMothershipMSSuccess;
         *
         * }*/

        void FreePilotsMSSuccess(MyMissionBase sender)
        {
            foreach (var spawn in m_pilotsSpawn)
            {
                MyScriptWrapper.ActivateSpawnPoint(spawn);
            }
            MyScriptWrapper.DeactivateSpawnPoint((uint)EntityID.Endless_spawn);
            //MyScriptWrapper.ActivateSpawnPoint((uint)EntityID.Mothership_Spawn_1);
            //MyScriptWrapper.ActivateSpawnPoint((uint)EntityID.Mothership_Spawn_2);
            //MyScriptWrapper.ActivateSpawnPoint((uint)EntityID.Mothership_Spawn_3);
            MyScriptWrapper.ApplyTransition(MyMusicTransitionEnum.HeavyFight, 3);

            //sender.OnMissionSuccess -= FreePilotsMSSuccess;
        }
        public override void Load()
        {
            //Because he has different position from junkyard race
            MyEntity manjeet = MyScriptWrapper.GetEntity((int)EntityID.FlyToManjeet);

            manjeet.SetPosition(new Vector3(-7529.0f, -3368.0f, 5938.0f));

            m_marcusForCrashDialoguePlayed = false;

            MyScriptWrapper.OnSpawnpointBotSpawned += MyScriptWrapperOnOnSpawnpointBotSpawned;
            MyScriptWrapper.OnBotReachedWaypoint   += MyScriptWrapperOnOnBotReachedWaypoint;
            MyScriptWrapper.OnDialogueFinished     += MyScriptWrapperOnOnDialogueFinished;
            MyScriptWrapper.OnEntityAtacked        += MyScriptWrapperOnOnEntityAtacked;

            MyScriptWrapper.ApplyTransition(MyMusicTransitionEnum.CalmAtmosphere, 0, "KA01");
            MyScriptWrapper.OnSentenceStarted += MyScriptWrapper_OnSentenceStarted;

            m_speakWithPoliceDialogueFinished = false;

            m_ravenGuy = (MySmallShipBot)MyScriptWrapper.GetEntity(MyActorConstants.GetActorName(MyActorEnum.VALENTIN));
            m_ravenGuy.SleepDistance = 8000;

            m_gameVolume = MyScriptWrapper.GetGameVolume();

            m_ravenGirl = (MySmallShipBot)MyScriptWrapper.GetEntity(MyActorConstants.GetActorName(MyActorEnum.TARJA));
            m_ravenGirl.SleepDistance = 8000;

            m_marcus = (MySmallShipBot)MyScriptWrapper.GetEntity(MyActorConstants.GetActorName(MyActorEnum.MARCUS));
            m_marcus.SleepDistance = 8000;

            m_madelyn = MyScriptWrapper.GetEntity(MyActorConstants.GetActorName(MyActorEnum.MADELYN));
            MyScriptWrapper.SetEntityDestructible(m_madelyn, false);
            m_madelyn.SetWorldMatrix(MyScriptWrapper.GetEntity((uint)EntityID.MadelynStart).WorldMatrix);

            m_madelynTurrets    = new MyPrefabLargeWeapon[3];
            m_madelynTurrets[0] = (MyPrefabLargeWeapon)MyScriptWrapper.GetEntity("BackTurretM");
            m_madelynTurrets[1] = (MyPrefabLargeWeapon)MyScriptWrapper.GetEntity("FrontTurretM");
            m_madelynTurrets[2] = (MyPrefabLargeWeapon)MyScriptWrapper.GetEntity("BottomTurretM");

            MyScriptWrapper.SetEntityPriority(MyScriptWrapper.GetEntity((uint)EntityID.EACMothershipContainer1), -1, true);
            MyScriptWrapper.SetEntityPriority(MyScriptWrapper.GetEntity((uint)EntityID.EACMothershipContainer2), -1, true);

            m_ravenGuyIn         = false;
            m_madelynMoving      = false;
            m_madelynMoving2     = false;
            m_desperationFadeout = false;

            base.Load();
        }