Osiris/API/CharacterSawCharacter
From Divinity Engine Wiki
Full Definition(s)
- event CharacterSawCharacter((CHARACTERGUID)_Character, (CHARACTERGUID)_OtherCharacter)
Description
Thrown when one _Character sees _OtherCharacter. Note that this event is only thrown if _Character is an event generator, or if the sight relation between _Character and _OtherCharacter has been previously created and is still active.
Parameters
- _Character: the character that does the seeing.
- _OtherCharacter: the character that is seen
Notes
- Only player-controlled characters that are not summons, are event generators.
- Once you call CharacterCanSee with an NPC as first parameter and a character as second parameter, a sight relation gets created for this NPC and the specified target. This sight relation will last between 0.5 and 1.0 seconds (random, to avoid having to re-evaluate the vision checks for all sight relations in the same frame).
- If you call CharacterCanSee again for this NPC and the same target during that period, the sight relation will be extended for another random period of similar duration.
- If a game is saved while a sight relation for two characters is active, it will only be stored into the savegame (and hence restored while loading) if the NPC can currently see the registered target.
- This call takes sneaking into account