Osiris/API/FadeOutDone

From Divinity Engine Wiki
Jump to: navigation, search
Full Definition(s)
  • event FadeOutDone((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
  • This event is new in DOS2 Patch 5. It is the new, clearer, name of the deprecated FadeDone event.
  • 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