Table of Contents

Method SetEventScript

Namespace
Anvil.API
Assembly
NWN.Anvil.dll

SetEventScript(EventScriptType, string?)

Sets the script to be run on the specified object event.

public void SetEventScript(EventScriptType eventType, string? script)

Parameters

eventType EventScriptType

The event to be assigned.

script string

The new script to assign to this event.

Exceptions

InvalidOperationException

Thrown if setting the event script failed. This can be from an invalid event script type, or this event is locked as a service has subscribed to this event. See IsEventLocked(EventScriptType) to determine if an event script can be changed.

ArgumentOutOfRangeException

Thrown if the specified script name is invalid.