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.
Sets the object's current state. Then, if it had one, the object's previous state script will be immediately called, passing it the mode constant PRStateModeEnd. After that, the object's current state script will be called passing it PRStateModeInit as its argument. Then, for every frame update (step), the object's current state script will be called with its mode argument set to PRStateModeUpdate.
PRStateSet(obj, stateName, optionalData1, optionalData2, optionalData3) 
The object to set the state for.
The name of the state to add. Must have been previously added to the object using PRStateAdd.
Arbitrary data to store for the given state. To be used at your discretion. (Optional)
Arbitrary data to store for the given state. To be used at your discretion. (Optional)
Arbitrary data to store for the given state. To be used at your discretion. (Optional)
true if the state was set, false otherwise.