Note: This PRState documentation is out-dated and is for an older (pre-GMS v2.3) version of PRState. For the most up-to-date docs on the latest version of PRState, please refer to this page as well as the documentation included in the PRState package.
You may find that, during your state scripts, or elsewhere in your project, you might need to know what the current state is for a given object, or what the object’s previous state was. You can find this out easily using the following two functions calls:
var currentState = PRStateCurrent(self); // May return “Run”, for example. var previousState = PRStatePrevious(self); // May return “Idle”, for example. 
The above code will return strings with the names of the current and previous states.