M&B: Bannerlord 1.0.0
The horns sound, the ravens gather.
Loading...
Searching...
No Matches
TaleWorlds.MountAndBlade.DestructableComponent Class Reference

Inherits TaleWorlds.MountAndBlade.SynchedMissionObject, and TaleWorlds.MountAndBlade.IFocusable.

Public Member Functions

delegate void OnHitTakenAndDestroyedDelegate (DestructableComponent target, Agent attackerAgent, in MissionWeapon weapon, ScriptComponentBehavior attackerScriptComponentBehavior, int inflictedDamage)
 
GameEntity GetOriginalState (GameEntity parent)
 
void Reset ()
 
void TriggerOnHit (Agent attackerAgent, int inflictedDamage, Vec3 impactPosition, Vec3 impactDirection, in MissionWeapon weapon, ScriptComponentBehavior attackerScriptComponentBehavior)
 
void BurstHeavyHitParticles ()
 
void SetDestructionLevel (int state, int forcedId, float blowMagnitude, Vec3 blowPosition, Vec3 blowDirection, bool noEffects=false)
 
void PreDestroy ()
 
override void WriteToNetwork ()
 
override bool ReadFromNetwork ()
 
override void AddStuckMissile (GameEntity missileEntity)
 
void OnFocusGain (Agent userAgent)
 
void OnFocusLose (Agent userAgent)
 
TextObject GetInfoTextForBeingNotInteractable (Agent userAgent)
 
string GetDescriptionText (GameEntity gameEntity=null)
 
- Public Member Functions inherited from TaleWorlds.MountAndBlade.SynchedMissionObject
override TickRequirement GetTickRequirement ()
 
void SetLocalPositionSmoothStep (ref Vec3 targetPosition)
 
virtual void SetVisibleSynched (bool value, bool forceChildrenVisible=false)
 
virtual void SetPhysicsStateSynched (bool value, bool setChildren=true)
 
virtual void SetDisabledSynched ()
 
void SetFrameSynched (ref MatrixFrame frame, bool isClient=false)
 
void SetGlobalFrameSynched (ref MatrixFrame frame, bool isClient=false)
 
void SetFrameSynchedOverTime (ref MatrixFrame frame, float duration, bool isClient=false)
 
void SetGlobalFrameSynchedOverTime (ref MatrixFrame frame, float duration, bool isClient=false)
 
void SetAnimationAtChannelSynched (string animationName, int channelNo, float animationSpeed=1.0f)
 
void SetAnimationAtChannelSynched (int animationIndex, int channelNo, float animationSpeed=1.0f)
 
void SetAnimationChannelParameterSynched (int channelNo, float parameter)
 
void PauseSkeletonAnimationSynched ()
 
void ResumeSkeletonAnimationSynched ()
 
void BurstParticlesSynched (bool doChildren=true)
 
void ApplyImpulseSynched (Vec3 localPosition, Vec3 impulse)
 
void AddBodyFlagsSynched (BodyFlags flags, bool applyToChildren=true)
 
void RemoveBodyFlagsSynched (BodyFlags flags, bool applyToChildren=true)
 
void SetTeamColors (uint color, uint color2)
 
virtual void SetTeamColorsSynched (uint color, uint color2)
 
virtual bool ReadFromNetwork ()
 
virtual void WriteToNetwork ()
 
- Public Member Functions inherited from TaleWorlds.MountAndBlade.MissionObject
 MissionObject ()
 
virtual void SetAbilityOfFaces (bool enabled)
 
override int GetHashCode ()
 
virtual void AfterMissionStart ()
 
void SetDisabled (bool isParentObject=false)
 Only disables the mission object script and removes it from active mission objects list but the object entity remains visible with active physics More...
 
void SetDisabledAndMakeInvisible (bool isParentObject=false)
 Mission object is disabled and removed from active mission objects list, its entity is made invisible and therefore its physics is turned off More...
 
virtual void OnEndMission ()
 
virtual void AddStuckMissile (GameEntity missileEntity)
 
- Public Member Functions inherited from TaleWorlds.Engine.ScriptComponentBehavior
void SetScriptComponentToTick (TickRequirement value)
 
void SetScriptComponentToTickMT (TickRequirement value)
 
virtual TickRequirement GetTickRequirement ()
 
void OnFocusGain (Agent userAgent)
 
void OnFocusLose (Agent userAgent)
 
TextObject GetInfoTextForBeingNotInteractable (Agent userAgent)
 
string GetDescriptionText (GameEntity gameEntity=null)
 

Public Attributes

string DestructionStates
 
bool DestroyedByStoneOnly = false
 
bool CanBeDestroyedInitially = true
 
float MaxHitPoint = 100.0f
 
bool DestroyOnAnyHit = false
 
bool PassHitOnToParent = false
 
string ReferenceEntityTag
 
string HeavyHitParticlesTag
 
float HeavyHitParticlesThreshold = 5.0f
 
string ParticleEffectOnDestroy = ""
 
string SoundEffectOnDestroy = ""
 
float SoundAndParticleEffectHeightOffset = 0.0f
 
float SoundAndParticleEffectForwardOffset = 0.0f
 
BattleSideEnum BattleSide = BattleSideEnum.None
 
Func< int, int, int, int > OnCalculateDestructionStateIndex
 

Static Public Attributes

const string CleanStateTag = "operational"
 
static float MaxBlowMagnitude = 20.0f
 

Properties

float HitPoint [get, set]
 
FocusableObjectType FocusableObjectType [get]
 
bool IsDestroyed [get]
 
GameEntity CurrentState [get]
 
- Properties inherited from TaleWorlds.MountAndBlade.SynchedMissionObject
uint Color [get]
 
uint Color2 [get]
 
bool SynchronizeCompleted [get]
 
- Properties inherited from TaleWorlds.MountAndBlade.MissionObject
MissionObjectId Id [get, set]
 
bool IsDisabled [get]
 
bool CreatedAtRuntime [get]
 
- Properties inherited from TaleWorlds.Engine.ScriptComponentBehavior
GameEntity GameEntity [get]
 
ManagedScriptComponent ScriptComponent [get]
 
ManagedScriptHolder ManagedScriptHolder [get]
 
Scene Scene [get]
 
- Properties inherited from TaleWorlds.MountAndBlade.IFocusable
FocusableObjectType FocusableObjectType [get]
 

Events

Action OnNextDestructionState
 
OnHitTakenAndDestroyedDelegate OnDestroyed
 
OnHitTakenAndDestroyedDelegate OnHitTaken
 

Additional Inherited Members

- Public Types inherited from TaleWorlds.MountAndBlade.SynchedMissionObject
enum  SynchFlags : uint
 
- Public Types inherited from TaleWorlds.Engine.ScriptComponentBehavior
enum  TickRequirement : uint
 
- Protected Member Functions inherited from TaleWorlds.MountAndBlade.MissionObject
virtual void AttachDynamicNavmeshToEntity ()
 
virtual GameEntity GetEntityToAttachNavMeshFaces ()
 
override void OnRemoved (int removeReason)
 
- Protected Member Functions inherited from TaleWorlds.Engine.ScriptComponentBehavior
void InvalidateWeakPointersIfValid ()
 
 ScriptComponentBehavior ()
 
virtual void OnRemoved (int removeReason)
 
- Protected Attributes inherited from TaleWorlds.MountAndBlade.MissionObject
string NavMeshPrefabName = ""
 
int DynamicNavmeshIdStart = 0
 
- Static Protected Attributes inherited from TaleWorlds.MountAndBlade.MissionObject
const int InsideNavMeshIdLocal = 1
 
const int EnterNavMeshIdLocal = 2
 
const int ExitNavMeshIdLocal = 3
 
const int BlockerNavMeshIdLocal = 4
 
const int ExtraNavMesh1IdLocal = 5
 
const int ExtraNavMesh2IdLocal = 6
 
const int ExtraNavMesh3IdLocal = 7
 

Member Function Documentation

◆ OnHitTakenAndDestroyedDelegate()

delegate void TaleWorlds.MountAndBlade.DestructableComponent.OnHitTakenAndDestroyedDelegate ( DestructableComponent  target,
Agent  attackerAgent,
in MissionWeapon  weapon,
ScriptComponentBehavior  attackerScriptComponentBehavior,
int  inflictedDamage 
)

◆ GetOriginalState()

GameEntity TaleWorlds.MountAndBlade.DestructableComponent.GetOriginalState ( GameEntity  parent)

◆ Reset()

void TaleWorlds.MountAndBlade.DestructableComponent.Reset ( )

◆ TriggerOnHit()

void TaleWorlds.MountAndBlade.DestructableComponent.TriggerOnHit ( Agent  attackerAgent,
int  inflictedDamage,
Vec3  impactPosition,
Vec3  impactDirection,
in MissionWeapon  weapon,
ScriptComponentBehavior  attackerScriptComponentBehavior 
)

◆ BurstHeavyHitParticles()

void TaleWorlds.MountAndBlade.DestructableComponent.BurstHeavyHitParticles ( )

◆ SetDestructionLevel()

void TaleWorlds.MountAndBlade.DestructableComponent.SetDestructionLevel ( int  state,
int  forcedId,
float  blowMagnitude,
Vec3  blowPosition,
Vec3  blowDirection,
bool  noEffects = false 
)

◆ PreDestroy()

void TaleWorlds.MountAndBlade.DestructableComponent.PreDestroy ( )

◆ WriteToNetwork()

override void TaleWorlds.MountAndBlade.DestructableComponent.WriteToNetwork ( )
virtual

◆ ReadFromNetwork()

override bool TaleWorlds.MountAndBlade.DestructableComponent.ReadFromNetwork ( )
virtual

◆ AddStuckMissile()

override void TaleWorlds.MountAndBlade.DestructableComponent.AddStuckMissile ( GameEntity  missileEntity)
virtual

◆ OnFocusGain()

void TaleWorlds.MountAndBlade.DestructableComponent.OnFocusGain ( Agent  userAgent)

◆ OnFocusLose()

void TaleWorlds.MountAndBlade.DestructableComponent.OnFocusLose ( Agent  userAgent)

◆ GetInfoTextForBeingNotInteractable()

TextObject TaleWorlds.MountAndBlade.DestructableComponent.GetInfoTextForBeingNotInteractable ( Agent  userAgent)

◆ GetDescriptionText()

string TaleWorlds.MountAndBlade.DestructableComponent.GetDescriptionText ( GameEntity  gameEntity = null)

Member Data Documentation

◆ CleanStateTag

const string TaleWorlds.MountAndBlade.DestructableComponent.CleanStateTag = "operational"
static

◆ MaxBlowMagnitude

float TaleWorlds.MountAndBlade.DestructableComponent.MaxBlowMagnitude = 20.0f
static

◆ DestructionStates

string TaleWorlds.MountAndBlade.DestructableComponent.DestructionStates

◆ DestroyedByStoneOnly

bool TaleWorlds.MountAndBlade.DestructableComponent.DestroyedByStoneOnly = false

◆ CanBeDestroyedInitially

bool TaleWorlds.MountAndBlade.DestructableComponent.CanBeDestroyedInitially = true

◆ MaxHitPoint

float TaleWorlds.MountAndBlade.DestructableComponent.MaxHitPoint = 100.0f

◆ DestroyOnAnyHit

bool TaleWorlds.MountAndBlade.DestructableComponent.DestroyOnAnyHit = false

◆ PassHitOnToParent

bool TaleWorlds.MountAndBlade.DestructableComponent.PassHitOnToParent = false

◆ ReferenceEntityTag

string TaleWorlds.MountAndBlade.DestructableComponent.ReferenceEntityTag

◆ HeavyHitParticlesTag

string TaleWorlds.MountAndBlade.DestructableComponent.HeavyHitParticlesTag

◆ HeavyHitParticlesThreshold

float TaleWorlds.MountAndBlade.DestructableComponent.HeavyHitParticlesThreshold = 5.0f

◆ ParticleEffectOnDestroy

string TaleWorlds.MountAndBlade.DestructableComponent.ParticleEffectOnDestroy = ""

◆ SoundEffectOnDestroy

string TaleWorlds.MountAndBlade.DestructableComponent.SoundEffectOnDestroy = ""

◆ SoundAndParticleEffectHeightOffset

float TaleWorlds.MountAndBlade.DestructableComponent.SoundAndParticleEffectHeightOffset = 0.0f

◆ SoundAndParticleEffectForwardOffset

float TaleWorlds.MountAndBlade.DestructableComponent.SoundAndParticleEffectForwardOffset = 0.0f

◆ BattleSide

BattleSideEnum TaleWorlds.MountAndBlade.DestructableComponent.BattleSide = BattleSideEnum.None

◆ OnCalculateDestructionStateIndex

Func<int, int, int, int> TaleWorlds.MountAndBlade.DestructableComponent.OnCalculateDestructionStateIndex

Property Documentation

◆ HitPoint

float TaleWorlds.MountAndBlade.DestructableComponent.HitPoint
getset

◆ FocusableObjectType

FocusableObjectType TaleWorlds.MountAndBlade.DestructableComponent.FocusableObjectType
get

◆ IsDestroyed

bool TaleWorlds.MountAndBlade.DestructableComponent.IsDestroyed
get

◆ CurrentState

GameEntity TaleWorlds.MountAndBlade.DestructableComponent.CurrentState
get

Event Documentation

◆ OnNextDestructionState

Action TaleWorlds.MountAndBlade.DestructableComponent.OnNextDestructionState

◆ OnDestroyed

OnHitTakenAndDestroyedDelegate TaleWorlds.MountAndBlade.DestructableComponent.OnDestroyed

◆ OnHitTaken

OnHitTakenAndDestroyedDelegate TaleWorlds.MountAndBlade.DestructableComponent.OnHitTaken