View Full Version : Richer state information

01-15-2017, 02:49 AM
The UI currently has more information about the state of an object than is available in Lua. It has the following:

Current state.
Sate count.
Name of each state object.

In Lua we only have access to the state count at present. A suggestion for adding current state is in this thread (http://www.berserk-games.com/forums/showthread.php?3434-Get-current-state-from-an-object-with-multiple-states-attached).


Implement a way to get richer information about all states, like a getStates()/getAllStates() which could return something like this:

{ state = 1, guid = '9869ea', name = 'State 1' },
{ state = 2, guid = 'bfa35b', name = 'State 2' },
{ state = 3, guid = '3468eb', name = 'State 3' }

Although, since objects with states are actually multiple objects with just one nominated as the currently existing one I suppose those guids only works in terms of comparing with the current object, all others aren't even in the scene I think (haven't confirmed).

01-15-2017, 02:21 PM
Current state is a major missing feature ATM, I agree.

However, you can get the state count. object.getStatesCount()