void AsteroidInsideExplosionR2()
 {
     MyScriptWrapper.AddExplosion(MyScriptWrapper.GetEntity((uint)EntityID.ExplosionRight2_1), MyExplosionTypeEnum.BOMB_EXPLOSION, 100f, 500f);
     MyScriptWrapper.AddExplosion(MyScriptWrapper.GetEntity((uint)EntityID.ExplosionRight2_2), MyExplosionTypeEnum.BOMB_EXPLOSION, 100f, 500f);
     MyScriptWrapper.PlayDialogue(MyDialogueEnum.CHINESE_ESCAPE_0300_ON_THIRD);
     MyScriptWrapper.ActivateSpawnPoint((uint)EntityID.SpawnInR);
 }
예제 #2
0
        private void RaceExplosionsDetectorEntered(MyEntityDetector sender, MyEntity entity, int meetCriterias)
        {
            if (sender == m_detector_Explosion1 && entity == MySession.PlayerShip)
            {
                MyScriptWrapper.AddExplosions(m_explosionParticles1, MyExplosionTypeEnum.BOMB_EXPLOSION, 5);

                MyScriptWrapper.PlaySound3D(MyScriptWrapper.GetEntity(m_explosionParticles1[0]), MySoundCuesEnum.VocRace09dirtyTricks);
                //MyScriptWrapper.IncreaseHeadShake(12f);
            }
            if (sender == m_detector_Explosion2 && entity == MySession.PlayerShip)
            {
                MyScriptWrapper.AddExplosions(m_explosionParticles2, MyExplosionTypeEnum.BOMB_EXPLOSION, 5);
                //MyScriptWrapper.IncreaseHeadShake(10f);
            }
            if (sender == m_detector_Explosion3 && entity == MySession.PlayerShip)
            {
                MyScriptWrapper.AddExplosions(m_explosionParticles3, MyExplosionTypeEnum.BOMB_EXPLOSION, 5);
                //MyScriptWrapper.IncreaseHeadShake(11f);
            }
            if (sender == m_detector_TunnelExplosion && entity == MySession.PlayerShip)
            {
                MyScriptWrapper.AddExplosion(MyScriptWrapper.GetEntity((uint)EntityID.ParticleExplosionInTunnel), MyExplosionTypeEnum.BOMB_EXPLOSION, 5);
                //MyScriptWrapper.PlaySound3D(MySession.PlayerShip, MySoundCuesEnum.SfxAcquireDroneOn);
                //MyScriptWrapper.PlaySound3D(MySession.PlayerShip, MySoundCuesEnum.SfxShipLargeExplosion);
                MyScriptWrapper.PlayDialogue(MyDialogueEnum.JUNKYARD_RETURN_0500);
            }
        }
 void AsteroidInsideExplosion4()
 {
     MyScriptWrapper.AddExplosion(MyScriptWrapper.GetEntity((uint)EntityID.ExplosionIn4_1), MyExplosionTypeEnum.BOMB_EXPLOSION, 100f, 500f);
     MyScriptWrapper.AddExplosion(MyScriptWrapper.GetEntity((uint)EntityID.ExplosionIn4_2), MyExplosionTypeEnum.BOMB_EXPLOSION, 100f, 500f);
     MyScriptWrapper.SetParticleEffect(MyScriptWrapper.GetEntity((uint)EntityID.ExplosionLarge2), true);
     MyScriptWrapper.PlaySound3D(MySession.PlayerShip, MySoundCuesEnum.SfxShipLargeExplosion);
     MissionTimer.RegisterTimerAction(1000, AsteroidInsideExplosion4_2, false);
 }
예제 #4
0
 private void Erupt(MyEntityDetector sender, MyEntity entity, int meetCriterias)
 {
     if (entity == MySession.PlayerShip)
     {
         MyScriptWrapper.AddExplosion(sender, MyExplosionTypeEnum.BOMB_EXPLOSION, MyMwcUtils.GetRandomFloat(40f, 60f), MyMwcUtils.GetRandomFloat(25f, 40f), true);
         MyScriptWrapper.IncreaseHeadShake(MyMwcUtils.GetRandomFloat(5f, 15f));
         sender.Off();
     }
 }
        //private void AssignTargetsToBots()
        //{
        //    foreach (var spawn in m_spawnCompanions)
        //    {
        //        MyScriptWrapper.GetEntity(spawn).Faction = MyMwcObjectBuilder_FactionEnum.China;
        //        foreach (var bot in MyScriptWrapper.GetSpawnPointBots(spawn))
        //        {
        //            if (bot.Ship != null)
        //            {
        //                bot.Ship.Attack(MyScriptWrapper.GetEntity((uint)m_transporterAttackPoints[MyMwcUtils.GetRandomInt(m_transporterAttackPoints.Count)]));
        //            }
        //        }
        //    }

        //    if (m_reassignBotTargets)
        //    {
        //        MissionTimer.RegisterTimerAction(3000, AssignTargetsToBots, false);
        //    }
        //}

        private void DetectorActionSecond(MyEntityDetector sender, MyEntity entity, int meetCriterias)
        {
            if (entity == m_transporter)
            {
                MissionTimer.RegisterTimerAction(8000, AsteroidInsideExplosionR2, false);
                MissionTimer.RegisterTimerAction(12000, AsteroidInsideExplosionL1, false);
                MissionTimer.RegisterTimerAction(20000, WatchFront, false);
                MissionTimer.RegisterTimerAction(15000, AsteroidInsideExplosion3, false);
                MissionTimer.RegisterTimerAction(18000, AsteroidInsideExplosion4, false);
                MyScriptWrapper.AddExplosion(MyScriptWrapper.GetEntity((uint)EntityID.ExplosionRight1_1), MyExplosionTypeEnum.BOMB_EXPLOSION, 100f, 500f);
                m_detectorSecond.Off();
                m_detectorSecond.OnEntityEnter -= DetectorActionSecond;
                m_detectorThird.OnEntityEnter  += DetectorActionThird;
                m_detectorThird.On();
            }
        }
예제 #6
0
        private void openCargoDoor_boom()
        {
            //door.Health = 0.1f;
            MyScriptWrapper.AddExplosion(MyScriptWrapper.GetEntity((uint)EntityID.PrefabBomb).GetPosition(), MyExplosionTypeEnum.BOMB_EXPLOSION, 80, 25);

            MyScriptWrapper.SetEntityEnabled(MyScriptWrapper.GetEntity((uint)EntityID.ParticleBombExplosion), true);

            MyScriptWrapper.CloseEntity(MyScriptWrapper.GetEntity((uint)EntityID.PrefabBomb));
            MyScriptWrapper.CloseEntity(MyScriptWrapper.GetEntity((uint)EntityID.DoorCargoBomb));

            var ravenGirl = (MySmallShipBot)MyScriptWrapper.GetEntity("RavenGirl");
            var ravenGuy  = (MySmallShipBot)MyScriptWrapper.GetEntity("RavenGuy");

            MyScriptWrapper.StopFollow(ravenGirl);
            MyScriptWrapper.StopFollow(ravenGuy);

            //ravenGirl.Follow
        }
        void OnAddExplosion(ref MyEventAddExplosion msg)
        {
            if (!MyMwcEnums.IsValidValue(msg.ExplosionFlags))
            {
                Alert("Invalid explosion", msg.SenderEndpoint, msg.EventType);
                return;
            }

            MyEntity entity;

            if (msg.EntityId.HasValue && MyEntities.TryGetEntityById(msg.EntityId.Value.ToEntityId(), out entity))
            {
                MyScriptWrapper.AddExplosion(entity, (MyExplosionTypeEnum)msg.ExplosionType, msg.Damage, msg.Radius, msg.ForceDebris, msg.CreateDecals, (MyParticleEffectsIDEnum?)msg.ParticleIDOverride);
            }
            else if (msg.Position.HasValue)
            {
                MyScriptWrapper.AddExplosion(msg.Position.Value, (MyExplosionTypeEnum)msg.ExplosionType, msg.Radius, msg.Damage, msg.ForceDebris, msg.CreateDecals);
            }
            else
            {
                Alert("Invalid explosion", msg.SenderEndpoint, msg.EventType);
            }
        }
 void AsteroidInsideExplosion4_2()
 {
     MyScriptWrapper.AddExplosion(MyScriptWrapper.GetEntity((uint)EntityID.ExplosionIn4_3), MyExplosionTypeEnum.BOMB_EXPLOSION, 100f, 500f);
     MyScriptWrapper.ActivateSpawnPoint((uint)EntityID.SpawnIn4);
 }
 void AsteroidInsideExplosionL1()
 {
     MyScriptWrapper.AddExplosion(MyScriptWrapper.GetEntity((uint)EntityID.ExplosionLeft1_1), MyExplosionTypeEnum.BOMB_EXPLOSION, 100f, 500f);
     MissionTimer.RegisterTimerAction(1000, AsteroidInsideExplosionL2, false);
 }