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.

Documentation Topics
Function

PRStateSet()

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.


Declaration

PRStateSet(obj, stateName, optionalData1, optionalData2, optionalData3)

Parameters

obj

The object to set the state for.

stateName

The name of the state to add. Must have been previously added to the object using PRStateAdd.

optionalData1

Arbitrary data to store for the given state. To be used at your discretion. (Optional)

optionalData2

Arbitrary data to store for the given state. To be used at your discretion. (Optional)

optionalData3

Arbitrary data to store for the given state. To be used at your discretion. (Optional)

Return Value

true if the state was set, false otherwise.