void Aggregator4Destroyed() { MySmallShipBot marcus = (MySmallShipBot)MyScriptWrapper.GetEntity("Marcus"); MyScriptWrapper.Move(marcus, MyScriptWrapper.GetEntity((uint)EntityID.DummyNearPrefabAutodestruct4).GetPosition()); MyScriptWrapper.ActivateSpawnPoint((uint)EntityID.SpawnAutodestruct); }
void O02SmugglerDialogueLoaded(MyMissionBase sender) { foreach (var item in m_companionSpawnpoints) { MyScriptWrapper.ActivateSpawnPoint(item); } }
protected static void ActivateSpawnpoints(List <uint> spawnPoints) { foreach (var spawnPoint in spawnPoints) { MyScriptWrapper.ActivateSpawnPoint(spawnPoint); } }
void MyScriptWrapper_AlarmLaunched(MyEntity prefabContainer, MyEntity enemy) { if (prefabContainer.EntityId != null && prefabContainer.EntityId.Value.NumericValue == 155) { MyScriptWrapper.ActivateSpawnPoint(153); } }
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 ActivateSpawnPoints(List <uint> spawnPoints) { foreach (var spawnPoint in spawnPoints) { MyScriptWrapper.ActivateSpawnPoint(spawnPoint); } }
void FindSecurityControl_OnMissionSuccess(MyMissionBase sender) { MyScriptWrapper.ActivateSpawnPoint((uint)EntityID.Security_Spawn); MyScriptWrapper.ActivateSpawnPoint((uint)EntityID.Security_Spawn1); MyScriptWrapper.ActivateSpawnPoint((uint)EntityID.FindSecurity_Spawn); MyScriptWrapper.ActivateSpawnPoint((uint)EntityID.Spawn_cargo); }
void O03FlyToStartLoaded(MyMissionBase sender) { MyScriptWrapper.OnBotReachedWaypoint += Script_BotReachedWaypoint; m_detector_ReachStart.OnEntityEnter += StartPositionEntered; m_detector_ReachStart.OnEntityLeave += StartPositionLeaved; m_detector_ReachStart.On(); MyScriptWrapper.ActivateSpawnPoint((uint)EntityID.Racer2); MyScriptWrapper.ActivateSpawnPoint((uint)EntityID.Racer3); MyScriptWrapper.MarkEntity(MyScriptWrapper.GetEntity((uint)EntityID.DetectorStartRacePosition), MyTexts.FlyToStartingPoint, HUD.MyHudIndicatorFlagsEnum.SHOW_TEXT | HUD.MyHudIndicatorFlagsEnum.SHOW_DISTANCE | HUD.MyHudIndicatorFlagsEnum.SHOW_BORDER_INDICATORS); m_manjeet.LookTarget = null; m_manjeet.SetWaypointPath("SmugglerOut"); m_manjeet.PatrolMode = CommonLIB.AppCode.ObjectBuilders.Object3D.MyPatrolMode.ONE_WAY; m_manjeet.Patrol(); MyScriptWrapper.SetSleepDistance(m_manjeet, 3000); MySmallShipBot challenger = (MySmallShipBot)MyScriptWrapper.GetEntity("Challenger"); challenger.SetWaypointPath("Gotostart"); challenger.PatrolMode = CommonLIB.AppCode.ObjectBuilders.Object3D.MyPatrolMode.ONE_WAY; challenger.Patrol(); MyScriptWrapper.SetSleepDistance(challenger, 20000); MyScriptWrapper.SetEntitiesEnabled(m_influenceSpheresFansBeforeStart, true); }
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); }
public void Detector3Action(MyEntityDetector sender, MyEntity entity, int meetCriterias) { if (MySession.IsPlayerShip(entity)) { MyScriptWrapper.ActivateSpawnPoint((uint)EntityID.Spawn3); m_Detector3.Off(); } }
public void Detector4Action(MyEntityDetector sender, MyEntity entity, int meetCriterias) { if (entity == MySession.PlayerShip) { MyScriptWrapper.ActivateSpawnPoint((uint)EntityID.Spawn4); m_Detector4.Off(); } }
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); }
void DestroyMSSucces(MyMissionBase sender) { foreach (var pc in m_pc) { MyScriptWrapper.SetEntityEnabled(pc, true); } MyScriptWrapper.ActivateSpawnPoint((uint)EntityID.DestroyGenerator_Spawn); }
void DestroyBatteriesMSSuccess(MyMissionBase sender) { MyScriptWrapper.ActivateSpawnPoint((uint)EntityID.Batteries_Spawn); foreach (var Light in TurnOff) { MyScriptWrapper.SetEntityEnabled(MyScriptWrapper.GetEntity(Light), false); } }
private void StartDummyDetector(MyEntityDetector sender, MyEntity entity, int meetCriterias) { if (entity == MySession.PlayerShip) { MyScriptWrapper.ActivateSpawnPoint((uint)EntityID.StartSpawn); sender.Off(); } }
public void Detector2_Enter(MyEntityDetector sender, MyEntity entity, int meetCriterias) { if (MyScriptWrapper.IsPlayerShip(entity)) { MyScriptWrapper.ActivateSpawnPoint((uint)EntityID.spawn2); sender.Off(); } }
public void BridgeDetectorAction(MyEntityDetector sender, MyEntity entity, int meetCriterias) { if (MyScriptWrapper.IsPlayerShip(entity)) { MyScriptWrapper.ActivateSpawnPoint((uint)EntityID.BridgeSpawnpoint); sender.Off(); } }
void BreakTheChains_OnMissionSuccess(MyMissionBase sender) { MyScriptWrapper.ActivateSpawnPoint((uint)EntityID.generatorspawn); foreach (var chainEffect in m_chainEffects) { MyScriptWrapper.SetEntityEnabled(chainEffect, false); } }
void StealMilitarySupply_Success(MyMissionBase sender) { MyScriptWrapper.HideEntity(MyScriptWrapper.GetEntity((uint)EntityID.CargoBox1)); MyScriptWrapper.PlayDialogue(MyDialogueEnum.RUSSIAN_TRANSMITTER_0900_VOLODIA_RANT); MyScriptWrapper.ActivateSpawnPoint((uint)EntityID.Cargospawn); MyScriptWrapper.Move(MyScriptWrapper.GetEntity((uint)EntityID.ShipVolodia), MyScriptWrapper.GetEntity((uint)EntityID.VolodiaDummy).GetPosition()); }
public void GeneratorDetector_Enter(MyEntityDetector sender, MyEntity entity, int meetCriterias) { if (MyScriptWrapper.IsPlayerShip(entity)) { MyScriptWrapper.ActivateSpawnPoint((uint)EntityID.GeneratorSpawnpoint); m_generatorDetector1.Off(); m_generatorDetector2.Off(); m_generatorDetector3.Off(); } }
void m_01GetBiomachSamples1_OnMissionLoaded(MyMissionBase sender) { MyScriptWrapper.ActivateSpawnPoint((uint)EntityID.SpawnpointAtVeryStart1); MyScriptWrapper.ActivateSpawnPoint((uint)EntityID.SpawnpointAtVeryStart2); MyScriptWrapper.ActivateSpawnPoint((uint)EntityID.SpawnpointAtVeryStart3); MyScriptWrapper.Highlight((uint)EntityID.BlinkLight1, true, this); MyScriptWrapper.PlayDialogue(MyDialogueEnum.WHITEWOLVES_RESEARCH_0100_COLLECT); }
private void Follow1Reached() { MyScriptWrapper.ActivateSpawnPoint((uint)EntityID.SpawnpointFactory); MySmallShipBot mitchel = (MySmallShipBot)MyScriptWrapper.GetEntity("Mitchel"); mitchel.SetWaypointPath("Follow2"); mitchel.PatrolMode = MyPatrolMode.ONE_WAY; mitchel.Patrol(); MyScriptWrapper.SetEntityEnabled((uint)EntityID.FactoryFound, true); }
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); }
void HangarOpen(MyMissionBase sender) { MyScriptWrapper.UnhideEntity(MyScriptWrapper.GetEntity((uint)EntityID.Hidden_Doors_1)); MyScriptWrapper.UnhideEntity(MyScriptWrapper.GetEntity((uint)EntityID.Hidden_Doors_2)); MyScriptWrapper.UnhideEntity(MyScriptWrapper.GetEntity((uint)EntityID.Hidden_Doors_3)); MyScriptWrapper.HideEntity(MyScriptWrapper.GetEntity((uint)EntityID.Hide_Doors_1)); MyScriptWrapper.HideEntity(MyScriptWrapper.GetEntity((uint)EntityID.Hide_Doors_2)); MyScriptWrapper.HideEntity(MyScriptWrapper.GetEntity((uint)EntityID.Hide_Doors_3)); MyScriptWrapper.HideEntity(MyScriptWrapper.GetEntity((uint)EntityID.Hide_Doors_4)); MyScriptWrapper.ActivateSpawnPoint((uint)EntityID.Prison_Spawm_3); }
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 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); }
/* 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; }
void TradeWithVolodia_Success(MyMissionBase sender) { MyScriptWrapper.GetEntity((uint)EntityID.Hub1).Enabled = true; MyScriptWrapper.GetEntity((uint)EntityID.Hub2).Enabled = true; MyScriptWrapper.UnhideEntity(MyScriptWrapper.GetEntity((uint)EntityID.Mothership)); MyScriptWrapper.ActivateSpawnPoint((uint)EntityID.CommandoSpawnPoint); //aktivace spawnpointu pri startu mise MyScriptWrapper.ActivateSpawnPoint((uint)EntityID.VolodiaCommandoSpawnPoint); //aktivace spawnpointu pri startu mise MyScriptWrapper.ActivateSpawnPoint((uint)EntityID.VolodiaCommandoSpawnPoint2); //aktivace spawnpointu pri startu mise var detector = MyScriptWrapper.GetDetector((uint)EntityID.DummyNearFrequencyHub); detector.On(); }
void AttackBegin(MyMissionBase sender) { foreach (var turret in m_turrets) { MyScriptWrapper.SetEntityEnabled(MyScriptWrapper.GetEntity(turret), false); } MyScriptWrapper.SetEntityEnabled(MyScriptWrapper.GetEntity((uint)EntityID.Central_Defense_System), false); foreach (var Spawn in m_warSpawn) { MyScriptWrapper.ActivateSpawnPoint(Spawn); } MyScriptWrapper.HideEntity(MyScriptWrapper.GetEntity((uint)EntityID.PC_Green)); MyScriptWrapper.UnhideEntity(MyScriptWrapper.GetEntity((uint)EntityID.PC_Red)); }
private void SpawnNewWave(int waveIndex) { if (m_currentWave < m_waves.Count) { m_waveShipCount = 0; foreach (var spawnpointId in m_waves[m_currentWave]) { MyScriptWrapper.ActivateSpawnPoint(spawnpointId); MySpawnPoint spawnpoint = MyScriptWrapper.TryGetEntity(spawnpointId) as MySpawnPoint; if (spawnpoint != null) { m_waveShipCount += spawnpoint.GetShipCount(); } } } }