Osiris/API/CharacterDie

From Divinity Engine Wiki
Revision as of 16:13, 19 December 2017 by Tinkerer (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Full Definition(s)
  • call CharacterDie((CHARACTERGUID)_Character, (INTEGER)_GenerateTreasure, (STRING)_DeathType, (GUIDSTRING)_Source)
Description

Kills _Character as if it died from _DeathType, coming from _Source. Depending on whether _GenerateTreasure is 1 or 0, treasure will be generated as if a player killed _Character or not.

Depending on the death type, the corpse and its pose can be different. Possible death types are (could use some love from someone with detailed knowledge about what these are used for):

  • None: no specific death type/default.
  • Physical: Died from physical damage.
  • Piercing: Died from piercing weapon damage.
  • Arrow: Took an arrow to the knee.
  • DoT: Damage-over-Time.
  • Incinerate: Burnt to death.
  • Acid: Died from acid/poison damage.
  • Electrocution: Died from electricity damage.
  • FrozenShatter: Died from shattering after being frozen. Cannot be source-vampirised.
  • PetrifiedShatter: Died from shattering after being petrified. Cannot be source-vampirised.
  • Explode: self-explanatory. Cannot be source-vampirised.
  • Surrender: No idea.
  • Hang: Died from being hanged. Hint: put the character on an invisible floating platform to make them hang above the ground like e.g. the corpse next to Master Siva in Act 2.
  • KnockedDown: A special death state for characters who died while knocked-down (so they don't fall down all over again).
  • LifeTime: Summon's lifetime ran out.

(New in DOS2 Patch 5) If _Source is not NULL, it specifies the killer. This parameter will be passed on to the CharacterKilledBy and CharacterTemplateKilledByCharacter events.

Notes
  • /
See Also