GetCurrentDestructionStage - ObjectReference

From Creation Kit
Jump to: navigation, search

Member of: ObjectReference Script

Obtains the current destruction stage of the object.

Syntax

int Function GetCurrentDestructionStage() native

Parameters

None.

Return Value

The object's current destruction stage.

Examples

; Has megaton hit stage 2 destruction yet?
if (MegatonReference.GetCurrentDestructionStage() >= 2)
  Debug.Trace("Wow, you've really beat that town up!")
endIf

Notes

If the object hasn't been damaged, stage 1 is reported as -1. So do <= 1 for checking if it's the first stage.

See Also