public override void Load() // Code in that block will be called on the load of the sector
 {
     base.Load();
     MyAudio.ApplyTransition(MyMusicTransitionEnum.CalmAtmosphere, 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.Euroamerican, MyMwcObjectBuilder_FactionEnum.Rainiers);
     MyScriptWrapper.SetFactionRelation(MyMwcObjectBuilder_FactionEnum.Euroamerican, MyMwcObjectBuilder_FactionEnum.Rainiers, MyFactions.RELATION_WORST);
 }
        public override void Load()
        {
            base.Load();

            MyScriptWrapper.AlarmLaunched += MyScriptWrapper_AlarmLaunched;

            // Turn off sunwind, meteorwind and icestorm
            MyScriptWrapper.EnableGlobalEvent(World.Global.MyGlobalEventEnum.SunWind, false);
            MyScriptWrapper.EnableGlobalEvent(World.Global.MyGlobalEventEnum.MeteorWind, false);
            MyScriptWrapper.EnableGlobalEvent(World.Global.MyGlobalEventEnum.IceStorm, false);

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

            // Add Radar Jammer to player inventory
            MyScriptWrapper.AddInventoryItem(MyScriptWrapper.GetPlayerInventory(), MyMwcObjectBuilderTypeEnum.SmallShip_Tool, (int)MyMwcObjectBuilder_SmallShip_Tool_TypesEnum.RADAR_JAMMER, 1f);

            // Add Hacking Tool to player inventory
            MyScriptWrapper.AddInventoryItem(MyScriptWrapper.GetCentralInventory(), MyMwcObjectBuilderTypeEnum.SmallShip_HackingTool, (int)MyMwcObjectBuilder_SmallShip_HackingTool_TypesEnum.Level_2, 1f, true);
            MyScriptWrapper.AddInventoryItem(MyScriptWrapper.GetCentralInventory(), MyMwcObjectBuilderTypeEnum.SmallShip_HackingTool, (int)MyMwcObjectBuilder_SmallShip_HackingTool_TypesEnum.Level_3, 1f, true);

            // Set musicmood right from script start
            MyAudio.ApplyTransition(MyMusicTransitionEnum.TensionBeforeAnAction);

            m_Slave = (MySmallShipBot)MyScriptWrapper.TryGetEntity(328);
            MySession.PlayerFriends.Add(m_Slave);
            m_Slave.Follow(MySession.PlayerShip);
            m_Slave.SetName("Slave");
        }
Exemple #3
0
 public override void Load() // Code in that block will be called on the load of the sector
 {
     base.Load();
     MyAudio.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);
     MyScriptWrapper.SetFactionRelation(MyMwcObjectBuilder_FactionEnum.Rainiers, MyMwcObjectBuilder_FactionEnum.China, -100);
 }
Exemple #4
0
 public override void Load() // Code in that block will be called on the load of the sector
 {
     base.Load();
     m_entranceR.OnMissionSuccess += entranceR_OnMissionSuccess;
     m_entranceL.OnMissionSuccess += entranceL_OnMissionSuccess;
     m_flyExit.OnMissionSuccess   += flyExit_OnMissionSuccess;
     //MyScriptWrapper.SetPlayerFaction(MyMwcObjectBuilder_FactionEnum.Rainiers);
     MyScriptWrapper.EntityHacked += MyScriptWrapper_EntityHacked;
     m_hub = MyScriptWrapper.GetEntity((uint)EntityID.HUB);
     MySession.PlayerShip.Inventory.AddInventoryItem(MyMwcObjectBuilderTypeEnum.SmallShip_HackingTool, (int)MyMwcObjectBuilder_SmallShip_HackingTool_TypesEnum.Level_2, 1f, true);
     MySession.PlayerShip.Inventory.AddInventoryItem(MyMwcObjectBuilderTypeEnum.Drone, (int)MyMwcObjectBuilder_Drone_TypesEnum.DroneUS, 1f, true);
     MyAudio.ApplyTransition(MyMusicTransitionEnum.CalmAtmosphere); // Sets music group to be played in the sector - no matter if the mission is running or not
 }
        public override void Load() // Code in that block will be called on the load of the sector
        {
            base.Load();
            MyAudio.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);
            MyScriptWrapper.SetFactionRelation(MyMwcObjectBuilder_FactionEnum.Russian, MyMwcObjectBuilder_FactionEnum.China, -100);


            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();
        }
 void mothershipBattle_OnMissionLoaded(MyMissionBase sender)
 {
     MyScriptWrapper.ActivateSpawnPoints(m_battleSpawnpoints);
     MyAudio.ApplyTransition(MyMusicTransitionEnum.HeavyFight, 100, "KA19");
 }
Exemple #7
0
 public override void Load() // Code in that block will be called on the load of the sector
 {
     base.Load();
     MyAudio.ApplyTransition(MyMusicTransitionEnum.DesperateWithStress, 3); // Sets music group to be played in the sector - no matter if the mission is running or not
 }