aimodel.getHandlerScript
Get a handle to the script of a handler.
Prototype
hResource = aimodel.getHandlerScript ( hAIModel, sName|nIndex )
Description
Get a handle to a handler of a function, either by name or by index. Useful to extract further information, like function arguments.
Parameters
hAIModel - valid AIModel handle
sName|nIndex - handler name string or index 1..nHandlerCount
Return values
hResource - script handle
Sample
for iIndex = 1, nHandlersCount do local hItem = tItems[ iIndex ] if ( hItem ) then local sHandlerName = tSortedHandlers[ iIndex ] local hHandlerScript = aimodel.getHandlerScript ( hResource, sHandlerName ) local tHandlerArguments = hHandlerScript and script.findFunctionArguments ( hHandlerScript ) or { } -- etc.
Available since ShiVa 2.0