Difference between revisions of "SetOnAnimActionEventHandler"
Jump to navigation
Jump to search
imported>Jazzisparis (Created page with "{{Function |origin = JIP |summary = Sets/removes the specified '''UDF Script''' as a handler that will be invoked in the event the specified '''Actor''' starts performing th...") |
imported>Jazzisparis |
||
(One intermediate revision by the same user not shown) | |||
Line 2: | Line 2: | ||
|origin = JIP | |origin = JIP | ||
|summary = Sets/removes the specified '''UDF Script''' as a handler that will be invoked in the event the specified '''Actor''' starts performing the specified '''Animation Action''' (see [[GetAnimAction]]). | |summary = Sets/removes the specified '''UDF Script''' as a handler that will be invoked in the event the specified '''Actor''' starts performing the specified '''Animation Action''' (see [[GetAnimAction]]). | ||
When invoked, the script is passed with the '''Actor''' as the calling reference ("<i>this</i>"), and a single argument: the performed '''Animation Action''' (0-13). | When invoked, the script is passed with the '''Actor''' as the calling reference ("<i>this</i>"), and a single argument: the performed '''Animation Action''' (0-13). | ||
|name = SetOnAnimActionEventHandler | |name = SetOnAnimActionEventHandler | ||
Line 12: | Line 13: | ||
|Type = 1/0 | |Type = 1/0 | ||
}}{{FunctionArgument | }}{{FunctionArgument | ||
|Name = | |Name = actorOrList | ||
|Type = ref | |Type = ref | ||
}}{{FunctionArgument | }}{{FunctionArgument | ||
Line 24: | Line 25: | ||
'''Removes''' the <i>OnAnimActionUDF</i> script as a handler of the above. | '''Removes''' the <i>OnAnimActionUDF</i> script as a handler of the above. | ||
}} | }} | ||
==Notes== | |||
*As the third argument, either a single reference, or a '''FormList''' of references may be passed. | |||
==Handler Script== | ==Handler Script== | ||
A skeleton handler script for this event: | A skeleton handler script for this event: |
Latest revision as of 19:00, 30 January 2017
< [[::Category:Functions|Category:Functions]]
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 Actor starts performing the specified Animation Action (see GetAnimAction).
When invoked, the script is passed with the Actor as the calling reference ("this"), and a single argument: the performed Animation Action (0-13).
Syntax
SetOnAnimActionEventHandler handlerScript:ref setORremove:1/0 actorOrList:ref animAction:int{0-13}
Example
SetOnAnimActionEventHandler OnAnimActionUDF 1 SomeActor 2
Sets the OnAnimActionUDF script as a handler to be invoked when SomeActor starts performing the Attack action.
SetOnAnimActionEventHandler OnAnimActionUDF 0 SomeActor 2
Removes the OnAnimActionUDF script as a handler of the above.
Notes
- As the third argument, either a single reference, or a FormList of references may be passed.
Handler Script
A skeleton handler script for this event:
scn OnAnimActionUDF int iAnimAction ref rActorRef begin Function {iAnimAction} set rActorRef to this (code) end