Exemplo n.º 1
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));
        }
Exemplo n.º 2
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;
 }
Exemplo n.º 3
0
        public override void Load()
        {
            if (!IsMainSector)
            {
                return;
            }

            //add biochem ammo
            //MyScriptWrapper.GetPlayerInventory().AddInventoryItem(MyMwcObjectBuilderTypeEnum.SmallShip_Ammo, (int)MyMwcObjectBuilder_SmallShip_Ammo_TypesEnum.Missile_BioChem, 100f, true);
            //MyScriptWrapper.GetPlayerInventory().AddInventoryItem(MyMwcObjectBuilderTypeEnum.SmallShip_Ammo, (int)MyMwcObjectBuilder_SmallShip_Ammo_TypesEnum.Universal_Launcher_Mine_BioChem, 100, true);
            MyScriptWrapper.AddInventoryItem(MyScriptWrapper.GetPlayerInventory(), MyMwcObjectBuilderTypeEnum.SmallShip_Ammo, (int)MyMwcObjectBuilder_SmallShip_Ammo_TypesEnum.Autocannon_BioChem, 100);
            MyScriptWrapper.AddInventoryItem(MyScriptWrapper.GetCentralInventory(), MyMwcObjectBuilderTypeEnum.SmallShip_HackingTool, (int)MyMwcObjectBuilder_SmallShip_HackingTool_TypesEnum.Level_2, 1f, true);

            MyScriptWrapper.DeactivateSpawnPoint((uint)EntityID.SpawnpointAtWeHaveCompany);

            /*
             * MyMwcObjectBuilder_SmallShip_Player originalBuilder = MySession.PlayerShip.GetObjectBuilder(true) as MyMwcObjectBuilder_SmallShip_Player;
             * originalBuilder.ShipType = MyMwcObjectBuilder_SmallShip_TypesEnum.GETTYSBURG;
             * MySession.PlayerShip.Close();
             * MyEntities.CreateFromObjectBuilderAndAdd(null, originalBuilder, originalBuilder.PositionAndOrientation.GetMatrix());
             */
            m_panelsLeft = GetPanelsLeft((uint)EntityID.PanelsPrefabContainer);
            //MyAudio.ApplyTransition(MyMusicTransitionEnum.HeavyFight);

            MyScriptWrapper.SetPlayerFaction(MyMwcObjectBuilder_FactionEnum.Rainiers);
            MyScriptWrapper.SetFactionRelation(MyMwcObjectBuilder_FactionEnum.Rainiers, MyMwcObjectBuilder_FactionEnum.FourthReich, MyFactions.RELATION_BEST);
            MyScriptWrapper.SetFactionRelation(MyMwcObjectBuilder_FactionEnum.Rainiers, MyMwcObjectBuilder_FactionEnum.Euroamerican, MyFactions.RELATION_WORST);
            MyScriptWrapper.FixBotNames();

            MyEntityDetector startDetector = MyScriptWrapper.GetDetector(MyScriptWrapper.GetEntity((uint)EntityID.StartDetector));

            startDetector.OnEntityEnter += StartDummyDetector;
            startDetector.On();

            MyEntityDetector Security01Detector = MyScriptWrapper.GetDetector(MyScriptWrapper.GetEntity((uint)EntityID.SecurityDetector));

            Security01Detector.OnEntityEnter += StartSecurity01Detector;
            Security01Detector.On();

            MyEntityDetector Security02Detector = MyScriptWrapper.GetDetector(MyScriptWrapper.GetEntity((uint)EntityID.SecurityDetector2));

            Security02Detector.OnEntityEnter += StartSecurity02Detector;
            Security02Detector.On();

            MyScriptWrapper.EntityClosing += EntityClosing;

            MyScriptWrapper.SetEntityEnabled(MyScriptWrapper.GetEntity((uint)EntityID.DestroyPanelsEnable1), false);
            MyScriptWrapper.SetEntityEnabled(MyScriptWrapper.GetEntity((uint)EntityID.CargoExitDoor), false);
            MyScriptWrapper.SetEntityEnabled(MyScriptWrapper.GetEntity((uint)EntityID.Doors1), false);
            MyScriptWrapper.SetEntityEnabled(MyScriptWrapper.GetEntity((uint)EntityID.DestroyPanelsEnable2), false);
            MyScriptWrapper.SetEntityEnabled(MyScriptWrapper.GetEntity((uint)EntityID.Doors3), false);
            MyScriptWrapper.SetEntityEnabled(MyScriptWrapper.GetEntity((uint)EntityID.Doors4), false);

            MyScriptWrapper.OnSpawnpointBotSpawned += OnSpawnpointSpawned;

            MyScriptWrapper.OnSentenceStarted += MyScriptWrapper_OnSentenceStarted;



            m_marcus = MyScriptWrapper.GetEntity("Marcus") as MySmallShipBot;

            //disable marcus
            if (m_marcus != null)
            {
                //MyScriptWrapper.DisableShip(m_ma);
                m_marcus.Enabled  = false;
                m_marcus.Visible  = false;
                m_marcus.ActiveAI = false;
                MyScriptWrapper.StopFollow(m_marcus);
                m_marcusInventory.Clear();
                m_marcusInventory.AddRange(m_marcus.Inventory.GetInventoryItems());
                m_marcus.Inventory.ClearInventoryItems();
            }

            //disable ships for marcus
            MyScriptWrapper.DisableShip(MyScriptWrapper.GetEntity((uint)EntityID.MarcusFakeShip1));
            MyScriptWrapper.DisableShip(MyScriptWrapper.GetEntity((uint)EntityID.MarcusFakeShip2));
            MyScriptWrapper.DisableShip(MyScriptWrapper.GetEntity((uint)EntityID.MarcusPlaceholder));
            MyScriptWrapper.DisableShip(MyScriptWrapper.GetEntity((uint)EntityID.MarcusFakeShip3));


            m_marcusPlacHolder = MyScriptWrapper.GetEntity((uint)EntityID.MarcusPlaceholder);

            MyScriptWrapper.SetEntityEnabled(MyScriptWrapper.GetEntity((int)EntityID.SecurityHub), false);

            InitDetector((uint)75094, StartEACDetector);

            //add Raven Girl and Raven Guy
            //We need to replace old vitolino+tanja, because they have deutch smallships from doppelburg

            m_ravenguyBot = MyScriptWrapper.GetEntity("RavenGuy") as MySmallShipBot;
            m_ravenguyBot.SetName("Disabled_vitolino");
            m_ravenguyBot.MarkForClose();

            m_ravenguyBot = MyScriptWrapper.InsertFriend(MyActorEnum.VALENTIN);
            m_ravenguyBot.LeaderLostEnabled = true;
            m_ravenguyBot.Follow(MySession.PlayerShip);
            Matrix ravenguyPosition = Matrix.CreateWorld(MySession.PlayerShip.GetPosition() - Vector3.Right * 15, MySession.PlayerShip.WorldMatrix.Forward, MySession.PlayerShip.WorldMatrix.Up);

            m_ravenguyBot.SetWorldMatrix(ravenguyPosition);

            m_ravengirlBot = MyScriptWrapper.GetEntity("RavenGirl") as MySmallShipBot;
            m_ravengirlBot.SetName("Disabled_tanja");
            m_ravengirlBot.MarkForClose();

            m_ravengirlBot = MyScriptWrapper.InsertFriend(MyActorEnum.TARJA);
            m_ravengirlBot.LeaderLostEnabled = true;
            m_ravenguyBot.Follow(MySession.PlayerShip);
            Matrix ravengirlPosition = Matrix.CreateWorld(MySession.PlayerShip.GetPosition() + Vector3.Right * 15, MySession.PlayerShip.WorldMatrix.Forward, MySession.PlayerShip.WorldMatrix.Up);

            m_ravengirlBot.SetWorldMatrix(ravengirlPosition);

            base.Load();
        }