SetShowOffOnCornerMessageEventHandler

From GECK
Jump to: navigation, search


A function added by the ShowOff NVSE Plugin version 1.25.

Description

Sets/removes the specified UDF Script as a handler that will be invoked whenever a corner message (like ones from MessageEx) is appended to the corner message queue. For example, it runs when a message is added via MessageExAlt, which is not necessarily when it is displayed.

When invoked, the script gets passed 5 arguments:

  1. The message text.
  2. The icon type, used for preset icon paths. Only used internally by the engine, otherwise left at 0.
  3. The icon path.
  4. The sound path (unknown when this is used, usually null).
  5. The duration of the message.
  • If any of the strings are null, they are passed as "<void>" to the UDF.

Unlike ShowOff:OnQueueCornerMessage, this will run even if the message being queued will be ignored and immediately removed from the queue. For example, if you have a Karma loss message currently displayed, then the game won't actually queue another one unless something else is in the queue, as it detects the redundancy and eliminates it.

Syntax

[help]
SetShowOffOnCornerMessageEventHandler setORremove:1/0 handlerScript:ref flag:int{Default:0} 

Or:

SetOnCornerMessageEventHandler setORremove:1/0 handlerScript:ref flag:int{Default:0}

Example

SetShowOffOnCornerMessageEventHandler 1 OnCornerMsgUDF

Sets the OnCornerMsgUDF script as a handler to be invoked whenever a corner message is appended to the queue.

SetShowOffOnCornerMessageEventHandler 0 OnCornerMsgUDF

Removes the OnCornerMsgUDF script as a handler of the above.

Handler Script

A skeleton handler script for this event:

scn OnCornerMsgUDF

string_var s_MsgText
int iIconType
string_var s_IconPath
string_var s_SoundPath
float fDisplayTime

Begin Function { s_MsgText, iIconType, s_IconPath, s_SoundPath, fDisplayTime }

  ;(code)

end

Notes

  • Flag argument is reserved for future use and should always be 0 or left at default for now.

See Also