The oPRAction Object

The oPRAction object included in the PRAction package is an object that implements the tweening action system. The objects in your project that require the ability to play actions that you've created must define the oPRAction object as their parent object. Once that is done, your objects will inherit the action system and the methods below.

Methods

PRGetActionsCount()

Description

Returns the number of currently running actions assigned to the object. Returns a value even if the current playing status is paused.

Parameters
  • None
Returns
Int

The number of currently running actions.

PRGetActionStatus()

Description

Returns the object's current action status. Valid return values are: PRACTION_STATUS_PLAYING, PRACTION_STATUS_STOPPED and PRACTION_STATUS_PAUSED.

Parameters
  • None
Returns
Int

The current action status.

PRGetSlotForActionWithName(name)

Description

Returns the first slot # for the action with a name matching the one given. If an action with that name isn't found, returns noone.

Parameters
  • name String

The name of the running action to search for.

Returns
Int

The slot number.

PRIsActionPlaying(slotOrName)

Description

Returns whether or not the action with the given name or slot index is playing.

Parameters
  • slotOrName Int/String

The action slot index or name.

Returns
Bool

True if the given action is running, false otherwise.

PRPauseActions()

Description

Pauses this object's action system.

Parameters
  • None
Returns

Nothing.

PRPlayAction(action, nameOpt)

Description

The object will play the given action. Does not interrupt other actions being played. Returns the action's slot index. Can optionally given the action a name to be able to reference that action later by certain methods.

Parameters
  • action PRAction Struct

The action to play.

  • nameOpt String - OPTIONAL

A name to assign to the action.

Returns
Int

The slot number of the running action.

PRResumeActions()

Description

Resumes this object's action system that was previously paused.

Parameters
  • None
Returns

Nothing.

PRStopAction(slotOrName)

Description

Stops the action at the given slot index or with the given name.

Parameters
  • slotOrName Int/String

The action slot index or name.

Returns

Nothing.

PRStopAllAction()

Description

Stops all the object's running actions.

Parameters
  • None
Returns

Nothing.

Constants

PRACTION_STATUS_PLAYING
PRACTION_STATUS_STOPPED
PRACTION_STATUS_PAUSED

Description

Specifies the current playing status of a PRAction-derived object.

PRACTION_TYPE_SEQUENCE
PRACTION_TYPE_GROUP
PRACTION_TYPE_REPEATER
PRACTION_TYPE_CUSTOM_VAR_TO
PRACTION_TYPE_CUSTOM_SCRIPT_2
PRACTION_TYPE_MOVE_TO
PRACTION_TYPE_MOVE_BY
PRACTION_TYPE_ROTATE_TO
PRACTION_TYPE_ROTATE_BY
PRACTION_TYPE_SCALE_X_TO
PRACTION_TYPE_SCALE_X_BY
PRACTION_TYPE_SCALE_Y_TO
PRACTION_TYPE_SCALE_Y_BY
PRACTION_TYPE_SCALE_TO
PRACTION_TYPE_SCALE_BY
PRACTION_TYPE_ALPHA_TO
PRACTION_TYPE_ALPHA_BY
PRACTION_TYPE_IMAGE_SPEED_TO
PRACTION_TYPE_IMAGE_SPEED_BY
PRACTION_TYPE_WAIT
PRACTION_TYPE_RUN_SCRIPT
PRACTION_TYPE_RUN_USER_EVENT
PRACTION_TYPE_PLAY_SOUND
PRACTION_TYPE_STOP_SOUND
PRACTION_TYPE_STOP_ALL_SOUNDS
PRACTION_TYPE_HIDE
PRACTION_TYPE_UNHIDE
PRACTION_TYPE_CHANGE_SPRITE
PRACTION_TYPE_PLAY_ACTION
PRACTION_TYPE_STOP_ACTION
PRACTION_TYPE_CHANGE_LAYER
PRACTION_TYPE_DEPTH_TO
PRACTION_TYPE_DEPTH_BY
PRACTION_TYPE_CUSTOM_SCRIPT_1
PRACTION_TYPE_MOVE_X_TO
PRACTION_TYPE_MOVE_X_BY
PRACTION_TYPE_MOVE_Y_TO
PRACTION_TYPE_MOVE_Y_BY
PRACTION_TYPE_BLEND_TO
PRACTION_TYPE_BLEND_BY
PRACTION_TYPE_CUSTOM_COLOUR_VAR_TO
PRACTION_TYPE_CUSTOM_COLOUR_SCRIPT
PRACTION_TYPE_SET_VAR
PRACTION_TYPE_STOP_ALL_ACTIONS
PRACTION_TYPE_CUSTOM_VAR_BY
PRACTION_TYPE_CUSTOM_COLOUR_VAR_BY
PRACTION_TYPE_DESTROY_OBJECT
PRACTION_TYPE_GOTO_ROOM

Description

Specifies the various action types of PRAction.


© 2021 Prismatic Realms, Inc. Contact

Green Hosting Badge