SetOnDialogTopicEventHandler

From GECK
Jump to: navigation, search


A function added by the JIP NVSE Plugin.

Description

Sets/removes the specified UDF Script as a handler that will be invoked in the event the specified Dialog Topic/Topic Info is spoken by an actor.

When invoked, the script is passed with the speaking Actor as the calling reference ("this"), and a single argument: the Topic or the Info (depending on what the event was set for) spoken.

  • When using a Topic Info for the 3rd argument, use the hexadecimal Form ID (Topic Infos have no Editor IDs).

Syntax

[help]
SetOnDialogTopicEventHandler handlerScript:form setORremove:1/0 topicOrInfo:form

Example

SetOnDialogTopicEventHandler OnDialogTopicUDF 1 FollowersHired

Sets the OnDialogTopicUDF script as a handler to be invoked whenever the FollowersHired topic is spoken.

SetOnDialogTopicEventHandler OnDialogTopicUDF 0 FollowersHired

Removes the OnDialogTopicUDF script as a handler of the above.

Handler Script

A skeleton handler script for this event:

scn	OnDialogTopicUDF

ref	rTopicOrInfo
ref	rSpeaker

begin Function {rTopicOrInfo}

	set rSpeaker to this

	(code)

end

See Also