void BotSpawned(MyEntity spawnpoint, MyEntity bot) { //List<uint> { // (uint)EntityID.SpawnLastR, // (uint)EntityID.SpawnLastL, // (uint)EntityID.SpawnLastAsteroid, // (uint)EntityID.SpawnCenterL, // (uint)EntityID.SpawnCenterR } var attackerList = new List<uint> { (uint)EntityID.SpawnInR, (uint)EntityID.SpawnInL, (uint)EntityID.SpawnIn3, (uint)EntityID.SpawnIn4, (uint)EntityID.SpawnFrontL, (uint)EntityID.SpawnFrontR, (uint)EntityID.SpawnCenterL, (uint)EntityID.SpawnCenterR, (uint)EntityID.SpawnLastL, (uint)EntityID.SpawnLastR, (uint)EntityID.SpawnLastAsteroid, (uint)EntityID.SpawnLast1, (uint)EntityID.SpawnLast1_2, (uint)EntityID.SpawnLast2, (uint)EntityID.SpawnLast2_2, (uint)EntityID.SpawnLast3, (uint)EntityID.SpawnLast3_2, (uint)EntityID.SpawnLast4, }; foreach (var item in attackerList) { if (spawnpoint == MyScriptWrapper.GetEntity(item) && bot != null) { MyScriptWrapper.SetSleepDistance(bot as MySmallShipBot, 10000); var botShip = bot as MySmallShipBot; m_attackerBots.Add(botShip); //botShip.Attack(MyScriptWrapper.GetEntity((uint)m_transporterAttackPoints[MyMwcUtils.GetRandomInt(m_transporterAttackPoints.Count)])); } } foreach (var item in m_spawnCompanions) { if (spawnpoint == MyScriptWrapper.GetEntity(item)) { MySmallShipBot botship = bot as MySmallShipBot; //botship.SlowDown = 0.583f; botship.SpeedModifier = 0.583f * (MOTHERSHIP_SLOWSPEED / MOTHERSHIP_FULLSPEED); botship.IsDestructible = m_reassignBotTargets; if (m_reassignBotTargets) bot.Kill(m_towers[MyMwcUtils.GetRandomInt(m_towers.Length)]); } } }