aimodel.setInitialState
Flag one AIModel state to be the initially active one.
Prototype
bOk = aimodel.setInitialState ( hAIModel, sName|nIndex )
Description
Flag one AIModel state to be the initially active one according to its specified name or index.
Parameters
hAIModel - valid AIModel handle
sName|nIndex - state name string or index number 1..nStateCount
Return values
bOk - true on success
Sample
-- if just one state exists, make it the initial one if ( aimodel.getStateCount ( hResource ) == 1 ) then aimodel.setInitialState ( hResource, 1 ) end
Available since ShiVa 2.0