Table of Contents

Class DestructableComponent

Namespace
TaleWorlds.MountAndBlade
Assembly
TaleWorlds.MountAndBlade.dll
public class DestructableComponent : SynchedMissionObject, IFocusable
Inheritance
DestructableComponent
Implements
Inherited Members

Fields

BattleSide

public BattleSideEnum BattleSide

Field Value

BattleSideEnum

CanBeDestroyedInitially

public bool CanBeDestroyedInitially

Field Value

bool

CleanStateTag

public const string CleanStateTag = "operational"

Field Value

string

DestroyOnAnyHit

public bool DestroyOnAnyHit

Field Value

bool

DestroyedByStoneOnly

public bool DestroyedByStoneOnly

Field Value

bool

DestructionStates

public string DestructionStates

Field Value

string

HeavyHitParticlesTag

public string HeavyHitParticlesTag

Field Value

string

HeavyHitParticlesThreshold

public float HeavyHitParticlesThreshold

Field Value

float

MaxBlowMagnitude

public static float MaxBlowMagnitude

Field Value

float

MaxHitPoint

public float MaxHitPoint

Field Value

float

OnCalculateDestructionStateIndex

[EditableScriptComponentVariable(false)]
public Func<int, int, int, int> OnCalculateDestructionStateIndex

Field Value

Func<int, int, int, int>

ParticleEffectOnDestroy

public string ParticleEffectOnDestroy

Field Value

string

PassHitOnToParent

public bool PassHitOnToParent

Field Value

bool

ReferenceEntityTag

public string ReferenceEntityTag

Field Value

string

SoundAndParticleEffectForwardOffset

public float SoundAndParticleEffectForwardOffset

Field Value

float

SoundAndParticleEffectHeightOffset

public float SoundAndParticleEffectHeightOffset

Field Value

float

SoundEffectOnDestroy

public string SoundEffectOnDestroy

Field Value

string

Properties

CurrentState

public GameEntity CurrentState { get; }

Property Value

GameEntity

FocusableObjectType

public FocusableObjectType FocusableObjectType { get; }

Property Value

FocusableObjectType

HitPoint

public float HitPoint { get; set; }

Property Value

float

IsDestroyed

public bool IsDestroyed { get; }

Property Value

bool

Methods

AddStuckMissile(GameEntity)

public override void AddStuckMissile(GameEntity missileEntity)

Parameters

missileEntity GameEntity

BurstHeavyHitParticles()

public void BurstHeavyHitParticles()

GetDescriptionText(GameEntity)

public string GetDescriptionText(GameEntity gameEntity = null)

Parameters

gameEntity GameEntity

Returns

string

GetInfoTextForBeingNotInteractable(Agent)

public TextObject GetInfoTextForBeingNotInteractable(Agent userAgent)

Parameters

userAgent Agent

Returns

TextObject

GetOriginalState(GameEntity)

public GameEntity GetOriginalState(GameEntity parent)

Parameters

parent GameEntity

Returns

GameEntity

MovesEntity()

protected override bool MovesEntity()

Returns

bool

OnAfterReadFromNetwork((BaseSynchedMissionObjectReadableRecord, ISynchedMissionObjectReadableRecord))

public override void OnAfterReadFromNetwork((BaseSynchedMissionObjectReadableRecord, ISynchedMissionObjectReadableRecord) synchedMissionObjectReadableRecord)

Parameters

synchedMissionObjectReadableRecord (BaseSynchedMissionObjectReadableRecord, ISynchedMissionObjectReadableRecord)

OnCheckForProblems()

protected override bool OnCheckForProblems()

Returns

bool

OnEditorInit()

protected override void OnEditorInit()

OnEditorTick(float)

protected override void OnEditorTick(float dt)

Parameters

dt float

OnEditorVariableChanged(string)

protected override void OnEditorVariableChanged(string variableName)

Parameters

variableName string

OnFocusGain(Agent)

public void OnFocusGain(Agent userAgent)

Parameters

userAgent Agent

OnFocusLose(Agent)

public void OnFocusLose(Agent userAgent)

Parameters

userAgent Agent

OnHit(Agent, int, Vec3, Vec3, in MissionWeapon, ScriptComponentBehavior, out bool)

protected override bool OnHit(Agent attackerAgent, int inflictedDamage, Vec3 impactPosition, Vec3 impactDirection, in MissionWeapon weapon, ScriptComponentBehavior attackerScriptComponentBehavior, out bool reportDamage)

Parameters

attackerAgent Agent
inflictedDamage int
impactPosition Vec3
impactDirection Vec3
weapon MissionWeapon
attackerScriptComponentBehavior ScriptComponentBehavior
reportDamage bool

Returns

bool

OnInit()

protected override void OnInit()

OnMissionReset()

protected override void OnMissionReset()

PreDestroy()

public void PreDestroy()

Reset()

public void Reset()

SetDestructionLevel(int, int, float, Vec3, Vec3, bool)

public void SetDestructionLevel(int state, int forcedId, float blowMagnitude, Vec3 blowPosition, Vec3 blowDirection, bool noEffects = false)

Parameters

state int
forcedId int
blowMagnitude float
blowPosition Vec3
blowDirection Vec3
noEffects bool

TriggerOnHit(Agent, int, Vec3, Vec3, in MissionWeapon, ScriptComponentBehavior)

public void TriggerOnHit(Agent attackerAgent, int inflictedDamage, Vec3 impactPosition, Vec3 impactDirection, in MissionWeapon weapon, ScriptComponentBehavior attackerScriptComponentBehavior)

Parameters

attackerAgent Agent
inflictedDamage int
impactPosition Vec3
impactDirection Vec3
weapon MissionWeapon
attackerScriptComponentBehavior ScriptComponentBehavior

WriteToNetwork()

public override void WriteToNetwork()

Events

OnDestroyed

public event DestructableComponent.OnHitTakenAndDestroyedDelegate OnDestroyed

Event Type

DestructableComponent.OnHitTakenAndDestroyedDelegate

OnHitTaken

public event DestructableComponent.OnHitTakenAndDestroyedDelegate OnHitTaken

Event Type

DestructableComponent.OnHitTakenAndDestroyedDelegate

OnNextDestructionState

public event Action OnNextDestructionState

Event Type

Action

This page was last modified at 09/01/2024 16:12:00 +00:00 (UTC).