Gets the id of the state.
The id of a state is the same as the index of the state in the camera's state list.