Divinity Engine Wiki
Advertisement
OnCharacterEvent (CHARACTER:character, STRING:eventName)
Thrown from scripts or story

OnCharacterItemEvent (CHARACTER:character, ITEM:item, STRING:eventName)
Thrown from scripts or story

OnItemEvent (ITEM:item, STRING:eventName)
Thrown from scripts or story

OnItemDestroyed (ITEM:item)
Thrown when an item is destroyed

OnItemDropped (ITEM:item, STRING:itemTemplate)
Thrown when an item is dropped

OnGlobalEventSet (STRING:eventName)
Thrown when a global event is set

OnGlobalEventCleared (STRING:eventName)
Thrown when a global event is cleared

OnTimer (FIXEDSTRING:timerName)
Throw when a timer has ended

OnInit ()
Thrown when the script is set

OnLoaded (INT:major, INT:minor, INT:revision, INT:build)
Thrown when the script is loaded from the savegame

OnShutdown ()
Thrown when the character's script is removed

OnCombatStarted ()
Thrown when the character entered a combat

OnCombatSwitched ()
Thrown when the character switch from one combat to another

OnCombatEnded ()
Thrown when the character left the combat

OnTurn ()
Thrown when the character's turn starts

OnTurnEnded ()
Thrown when the character's turn ended

OnVitalityChanged (FLOAT:percentage)
Thrown when the object's vitality changed

OnAttackOfOpportunity (CHARACTER:target)
Thrown when the characters gets an attack of opportunity on an enemy

OnDamage (DAMAGE:type, FLOAT:percentage, CHARACTER:source, ITEM:source)
Thrown when the object receives damage

OnMiss (CHARACTER:source, ITEM:source)
Thrown when the character dodges something

OnBlock (CHARACTER:source, ITEM:source)
Thrown when the character blocks something

OnDie (CHARACTER:character, DAMAGE:type, CHARACTER:source, ITEM:source)
Thrown when the character dies

OnCharacterStatus (CHARACTER:character, STATUS:status)
Thrown when the character gains a status

OnCharacterStatusRemoved (CHARACTER:character, STATUS:status)
Thrown when the character loses a status

OnItemStatus (ITEM:item, STATUS:status)
Thrown when the item gains a status

OnItemStatusRemoved (ITEM:item, STATUS:status)
Thrown when the item loses a status

OnStatusCreateVisuals (STATUS:status)
Thrown when the item should create the visuals for this status

OnStatusDestroyVisuals (STATUS:status)
Thrown when the item should destroy the visuals for this status

OnSight (CHARACTER:character)
Thrown when the character sees another character

OnLostSight (CHARACTER:character)
Thrown when the character doesn't see another character anymore

OnUseItem (CHARACTER:source, ITEM:item)
Thrown when a character uses an item

OnIterateCharacter (CHARACTER:character, FIXEDSTRING:eventId)
Thrown by iterators

OnIterateItem (ITEM:source, FIXEDSTRING:eventId)
Thrown by iterators

OnStoryOverride ()
Throw when story overrides what the character was doing: teleport, movement, on/offstage

OnTriggerEnter (CHARACTER:character, FIXEDSTRING:eventId)
Thrown by entering an EventTrigger

OnTriggerLeave (CHARACTER:character, FIXEDSTRING:eventId)
Thrown by leaving an EventTrigger

OnEnemyChanged (CHARACTER:character, CHARACTER:newEnemy)
Thrown when the character's currentenemy changes

OnTalentUnlocked (CHARACTER:character, TALENT:newTalent)
Thrown when the character unlocks a new talent

OnCharacterClassChanged (CHARACTER:character, FIXEDSTRING:class)
Thrown when the character changes class in the character creation screen

OnCharacterCreationStarted (CHARACTER:character, TRIGGER:creationPoint)
Thrown when the character creation has started, and gives where the character should walk to

OnCharacterCreationStopped (CHARACTER:character)
Thrown when the character creation has stopped

OnFunction (FIXEDSTRING:functionName)
Throws an event on itself with the functionName. This is to fake function calls
Parameters & return values should be global variables.

Advertisement