Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

Sandbox.ModAPI.Ingame.IMyOffensiveCombatHitAndRun

Morten Aune Lyrstad edited this page Apr 13, 2023 · 1 revision

IndexNamespace Index

IMyOffensiveCombatHitAndRun Interface

public interface IMyOffensiveCombatHitAndRun: IMyAttackPatternComponent

Describes entity component for AttackPattern of offensive combat block

Namespace: Sandbox.ModAPI.Ingame
Assembly: Sandbox.Common.dll

Implements:

Properties

float BreakOffDistance { get; set; }

Gets or sets break off distance (in meters)

bool IsMovingAwayFromTarget { get; }

Gets if grid is moving away from target

bool IsMovingToTarget { get; }

Gets if grid is moving to target

float RetreatAngle { get; set; }

Gets or sets retreat angle (in degrees)

float RetreatDistance { get; set; }

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

float RetreatTimeout { get; set; }

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

long AttackPatternId { get; }

Gets attack pattern id

Inherited from IMyAttackPatternComponent

MyStringId AttackPatternName { get; }

Gets attack pattern name

Inherited from IMyAttackPatternComponent

MyStringId AttackPatternTooltip { get; }

Gets attack pattern tooltip

Inherited from IMyAttackPatternComponent

bool HasEnemy { get; }

Gets if attack pattern has enemy in range

Inherited from IMyAttackPatternComponent

bool IsSelected { get; }

Gets if attack pattern is selected

Inherited from IMyAttackPatternComponent

Methods

void GetSelectedWeapons(List<long> blockEntityIds)

Gets weapons that should be used to damage to attack enemy May return also modded guns EntityId.

bool IsWeaponSelected(long blockEntityId)

Gets if weapon is selected

void SetSelectedWeapons(List<long> blockEntityId)

Sets weapons EntityIds that can would be used to damage to attack enemy Modded gun are allowed, but you need override Sandbox.ModAPI.IMyOffensiveCombatHitAndRun.BlockValidation and Sandbox.ModAPI.IMyOffensiveCombatHitAndRun.SetShooting

Clone this wiki locally