Osiris/API/FadeDone

From Divinity Engine Wiki
Revision as of 18:05, 9 September 2017 by Tinkerer (talk | contribs) (FadeDone event)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Full Definition(s)
  • event FadeDone((INTEGER)_UserID, (STRING)_FadeID)
Description

Thrown when a fade-to-black or fade-to-white operation finished.

Parameters
  • _UserID: Do not rely on this parameter. Theoretically, it should contain the ID of the user for which the fade was done. In practice, this value is unreliable.
  • _Event: The name of the event specified to FadeToBlack or FadeToWhite.
Notes
  • Since you cannot rely on the _UserID parameter, when potentially fading for multiple users at the same time and wanting to catch this event, you have to create a separate _FadeDone event for every user. One way of doing this is as follows:
PROC
PROC_MYPREFIX_FadeToBlackForChar((CHARACTERGUID)_Char, (STRING)_BaseEventName)
AND
GetUUID(_Char, _UserIDString)
AND
StringConcatenate(_BaseEventName, _UserIDString, _FadeEvent)
THEN
DB_MYPREFIX_FadeEvent(_Char, _FadeEvent);
FadeToBlack(_Char, 3.0, 0, _FadeEvent);

IF
FadeDone(_, _FadeEvent)
AND
DB_MYPREFIX_FadeEvent(_Char, _FadeEvent)
THEN
NOT DB_MYPREFIX_FadeEvent(_Char, _FadeEvent);
// Do what you want to do when the fade is finished
See Also