Assembly: Sandbox.Common.dll

public interface IMyOffensiveCombatHitAndRun: IMyOffensiveCombatHitAndRun, IMyAttackPatternComponent, IMyAttackPatternComponent

Describes entity component for AttackPattern of offensive combat block

Events

Member Description
StateChanged Triggered when changed state between IsMovingAwayFromTarget, IsMovingToTarget, and idle state

Properties

Member Description
BlockValidation Gets or sets function that is called when block caches all available weapons, and called on server to validate, that user selected weapon is correct Used for adding custom weapons. By default used reference to Keen default function Must not be null. You need override it on server and client
ClearBlocksShootingState Gets or sets function that is called when grid is copied. You need clear state of shooting weapons By default used reference to Keen default function Must not be null. You need override it on server and client IMyCubeGrid - original grid which would be copied MyObjectBuilder_CubeGrid - grid which state you need clear IMyAttackPatternComponent - attack pattern, that calls this clear
GetFirstWeaponForwardVector Gets or sets function that is called to know how grid should rotate to face target By default used reference to Keen default function (returns WorldMatrix.Forward vector) IMyAttackPatternComponent - attack pattern, that calls this clear Returns blocks WorldMatrix.Forward
GetPredictedLookAt Gets or sets function that is called for aiming grid at enemy By default used reference to Keen default function Must not be null. You need override it on server and client IMyEntity - entity that you should aim at predicting it's future position, and bullet speed IMyAttackPatternComponent - current component that need aim Double - distance to target squared Returns world position
SetShooting Gets or sets function that is called per block requesting it start or stop shooting. Used for adding custom weapons. By default used reference to Keen default function Must not be null. You need override it on server and client IMyCubeBlock - Weapon block to test bool - Should block shoot or not double - DistanceToTargetSq squared distance in meters to target Vector3D? - aim position, predicted shoot position Base6Directions.Direction - shoot direction Called in parallel update of Autopilot
AttackPatternId Gets attack pattern id

Inherited from IMyAttackPatternComponent
AttackPatternName Gets attack pattern name

Inherited from IMyAttackPatternComponent
AttackPatternTooltip Gets attack pattern tooltip

Inherited from IMyAttackPatternComponent
BreakOffDistance Gets or sets break off distance (in meters)

Inherited from IMyOffensiveCombatHitAndRun
HasEnemy Gets if attack pattern has enemy in range

Inherited from IMyAttackPatternComponent
IsMovingAwayFromTarget Gets if grid is moving away from target

Inherited from IMyOffensiveCombatHitAndRun
IsMovingToTarget Gets if grid is moving to target

Inherited from IMyOffensiveCombatHitAndRun
IsSelected Gets if attack pattern is selected

Inherited from IMyAttackPatternComponent
IsSelected Gets if attack pattern is selected

Inherited from IMyAttackPatternComponent
RetreatAngle Gets or sets retreat angle (in degrees)

Inherited from IMyOffensiveCombatHitAndRun
RetreatDistance Gets or sets max distance that grid can run away from target

Inherited from IMyOffensiveCombatHitAndRun
RetreatTimeout Gets or sets max time that grid can run away from target

Inherited from IMyOffensiveCombatHitAndRun

Methods

Member Description
AppendCustomInfo(StringBuilder) Override to add information about mission status

Inherited from IMyAttackPatternComponent
CreateTerminalInterfaceControls() Inherited from IMyAttackPatternComponent
GetSelectedWeapons(List) Gets weapons that should be used to damage to attack enemy May return also modded guns EntityId.

Inherited from IMyOffensiveCombatHitAndRun
IsWeaponSelected(long) Gets if weapon is selected

Inherited from IMyOffensiveCombatHitAndRun
SetSelectedWeapons(List) Sets weapons EntityIds that can would be used to damage to attack enemy Modded gun are allowed, but you need override BlockValidation and SetShooting

Inherited from IMyOffensiveCombatHitAndRun

Implements: