SetNthDestructionStageTrait

From GECK
Jump to: navigation, search


A function added by the JIP NVSE Plugin.

Description

Sets the value of a numeric trait (determined by traitID) of the Nth destruction stage in the Destruction Data of the specified Object.

Syntax

[help]
(traitValue:int) SetNthDestructionStageTrait object:ref stageIndex:int traitID:int{0-4} newValue:int

Destruction Stage Trait IDs

0	Health Percentage
1	Self Damage per Second
2	Model Damage Stage
3	Flags Bitmask (see below)
4	Debris Count

Flags:

1	Cap Damage
2	Disable Object
4	Destroy Object

Example

SetNthDestructionStageTrait ElectricBox01 0 1 10

Will set the Self Damage per Second of the first (index 0) destruction stage of ElectricBox01 to 10.

SetNthDestructionStageTrait ElectricBox01 2 3 5

Will set the Flags Bitmask of the third (index 2) destruction stage of ElectricBox01 to 5, thus enable Cap Damage (1) and Destroy Object (4), and disable Disable Object (2).

Notes

  • Obviously, this function is only usable with object types that have Destruction Data.

See Also