#2874
pontosan milyen a scriptek amiket linkelni akartok? ilyet találtam:
void Main(){
//create a list to gather the turrets into
List<IMyTerminalBlock> turrets = new List<IMyTerminalBlock>();
//populate that list with every block in the ship which is a turret
GridTerminalSystem.GetBlocksOfType<IMyLargeTurretBase>(turrets);
//loop through each turret in the list...
for(int i = 0; i < turrets.Count; i++){
//...assign each one in turn to this variable...
IMyTerminalBlock turret = turrets[i];
//...and apply its 'toggle off' action
turret.GetActionWithName("OnOff_Off").Apply(turret);
}
}
Nincs szükség idézőjelekre, csak benyomod a kódot a két bbcode közé. Utoljára szerkesztette: Jim Morrison, 2016.02.13. 10:52:14