aimodel.getStateCount
Returns the number of states in an AIModel.
Prototype
nCount = aimodel.getStateCount ( hAIModel )
Description
Returns the number of states in an AIModel.
Parameters
hAIModel - valid AIModel handle
Return values
nCount - number 0..n
Sample
local nStatesCount = aimodel.getStateCount ( hResource ) if ( nStatesCount > 0 ) then local sInitialStateName = aimodel.getInitialStateName ( hResource ) for iIndex = 1, nStatesCount do local sStateName = aimodel.getStateName ( hResource, iIndex ) -- etc.
Available since ShiVa 2.0