Interface IMyTurretControlBlock
Describes Turret Control block (PB scripting interface)
Inherited Members
Namespace: SpaceEngineers.Game.ModAPI.Ingame
Assembly: Sandbox.Common.dll
Syntax
public interface IMyTurretControlBlock : IMyFunctionalBlock, IMyTerminalBlock, IMyCubeBlock, IMyEntity
Properties
AIEnabled
Gets whether this block has AI enabled for turret
Declaration
bool AIEnabled { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
AngleDeviation
Gets or Sets angle deviation
Declaration
float AngleDeviation { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
AzimuthRotor
Gets or Sets rotor for the azimuth angle
Declaration
IMyMotorStator AzimuthRotor { get; set; }
Property Value
Type | Description |
---|---|
IMyMotorStator |
Camera
Gets or Sets camera for the block
Declaration
IMyCameraBlock Camera { get; set; }
Property Value
Type | Description |
---|---|
IMyCameraBlock |
ElevationRotor
Gets or Sets rotor for the elevation angle
Declaration
IMyMotorStator ElevationRotor { get; set; }
Property Value
Type | Description |
---|---|
IMyMotorStator |
HasTarget
Gets whether the turret is locked onto a target
Declaration
bool HasTarget { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsAimed
Gets whether this block is aimed at the target
Declaration
bool IsAimed { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsSunTrackerEnabled
Gets or sets if turret control block should aim sun
Declaration
bool IsSunTrackerEnabled { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsUnderControl
Gets whether this block is locally or remotely controlled.
Declaration
bool IsUnderControl { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
MoveIndicator
Gets movement indicator
Declaration
Vector3 MoveIndicator { get; }
Property Value
Type | Description |
---|---|
Vector3 |
Range
Sets or Gets shooting range of the turret
Declaration
float Range { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
RollIndicator
Gets roll indicator
Declaration
float RollIndicator { get; }
Property Value
Type | Description |
---|---|
System.Single |
RotationIndicator
Gets rotation indicator
Declaration
Vector2 RotationIndicator { get; }
Property Value
Type | Description |
---|---|
Vector2 |
TargetCharacters
Gets or Sets if the turret should target characters.
Declaration
bool TargetCharacters { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
TargetFriends
Gets or Sets if the turret should target friends.
Declaration
bool TargetFriends { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
TargetLargeGrids
Gets or Sets if the turret should target large grids.
Declaration
bool TargetLargeGrids { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
TargetMeteors
Gets or Sets if the turret should target meteors.
Declaration
bool TargetMeteors { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
TargetMissiles
Gets or Sets if the turret should target missiles.
Declaration
bool TargetMissiles { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
TargetNeutrals
Gets or Sets if the turret should target neutrals.
Declaration
bool TargetNeutrals { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
TargetSmallGrids
Gets or Sets if the turret should target small grids.
Declaration
bool TargetSmallGrids { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
TargetStations
Gets or Sets if the turret should target stations.
Declaration
bool TargetStations { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
VelocityMultiplierAzimuthRpm
Gets or Sets velocity multiplier for azimuth [rpm]
Declaration
float VelocityMultiplierAzimuthRpm { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
VelocityMultiplierElevationRpm
Gets or Sets velocity multiplier for elevation [rpm]
Declaration
float VelocityMultiplierElevationRpm { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
Methods
AddTool(IMyFunctionalBlock)
Adds the tool for the block
Declaration
void AddTool(IMyFunctionalBlock tool)
Parameters
Type | Name | Description |
---|---|---|
IMyFunctionalBlock | tool | tool (weapons/tools blocks) which player can set in UI |
AddTools(List<IMyFunctionalBlock>)
Adds tools for the block
Declaration
void AddTools(List<IMyFunctionalBlock> tools)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<IMyFunctionalBlock> | tools | tools collection (weapons/tools blocks) which player can set in UI |
ClearTools()
Clears tools
Declaration
void ClearTools()
GetDirectionSource()
Get block that provides direction of shooting
Declaration
IMyTerminalBlock GetDirectionSource()
Returns
Type | Description |
---|---|
IMyTerminalBlock |
GetShootDirection()
Get direction of shooting.
Declaration
Vector3 GetShootDirection()
Returns
Type | Description |
---|---|
Vector3 |
GetTargetedEntity()
Gets the turret's current detected entity, if any
Declaration
MyDetectedEntityInfo GetTargetedEntity()
Returns
Type | Description |
---|---|
MyDetectedEntityInfo | empty info if target does not exist |
GetTargetingGroup()
Gets current targeting group
Declaration
string GetTargetingGroup()
Returns
Type | Description |
---|---|
System.String | current targeting group |
GetTargetingGroups()
Gets all available targeting groups
Declaration
List<string> GetTargetingGroups()
Returns
Type | Description |
---|---|
System.Collections.Generic.List<System.String> | list of names of targeting groups |
GetTools(List<IMyFunctionalBlock>)
Gets tools for the block
Declaration
void GetTools(List<IMyFunctionalBlock> tools)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<IMyFunctionalBlock> | tools | tools collection (weapons/tools blocks) which player can set in UI |
RemoveTool(IMyFunctionalBlock)
Removes the tool for the block
Declaration
void RemoveTool(IMyFunctionalBlock tool)
Parameters
Type | Name | Description |
---|---|---|
IMyFunctionalBlock | tool | tool (weapons/tools blocks) which player can set in UI |
RemoveTools(List<IMyFunctionalBlock>)
Removes tools for the block
Declaration
void RemoveTools(List<IMyFunctionalBlock> tool)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<IMyFunctionalBlock> | tool | tools collection (weapons/tools blocks) which player can set in UI |
SetTargetingGroup(String)
Sets current targeting group
Declaration
void SetTargetingGroup(string groupSubtypeId)
Parameters
Type | Name | Description |
---|---|---|
System.String | groupSubtypeId | group subtype id |