Standard Action Creation Functions

PRActionCreateAlphaBy(alphaBy, easeFunc, durationSecs)

Description

Creates and returns an action of type PRACTION_TYPE_ALPHA_BY. When an oPRAction-derived object instance plays this action, that object instance will have its image_alpha value smoothly change from its current value by the alphaBy value over a period of durationSecs seconds. The animation curve used in this transition is governed by the easing function provided in easeFunc, which can be one of the PRActionEase* functions.

Parameters
  • alphaBy Real

The amount that the object instance's image_alpha value will change by.

  • easeFunc Function ID

The easing function to use for the transition.

  • durationSecs Real

The duration in seconds that the action should take to run.

Returns
PRAction Struct

An action that can be played by a PRAction-derived object.

PRActionCreateAlphaTo(alphaTo, easeFunc, durationSecs)

Description

Creates and returns an action of type PRACTION_TYPE_ALPHA_TO. When an oPRAction-derived object instance plays this action, that object instance will have its image_alpha value smoothly change from its current value to the new alphaTo value over a period of durationSecs seconds. The animation curve used in this transition is governed by the easing function provided in easeFunc, which can be one of the PRActionEase* functions.

Parameters
  • alphaTo Real

The new image_alpha value to transition to.

  • easeFunc Function ID

The easing function to use for the transition.

  • durationSecs Real

The duration in seconds that the action should take to run.

Returns
PRAction Struct

An action that can be played by a PRAction-derived object.

PRActionCreateBlendBy(byRed, byGreen, byBlue, easeFunc, durationSecs)

Description

Creates and returns an action of type PRACTION_TYPE_BLEND_BY. When an oPRAction-derived object instance plays this action, that object instance will have its image_blend colour value smoothly change from its current value by the given individual byRed, byGreen and byBlue colour component amounts over a period of durationSecs seconds. The animation curve used in this transition is governed by the easing function provided in easeFunc, which can be one of the PRActionEase* functions.

Parameters
  • byRed Int

The amount of red that the instance's image_blend will change by.

  • byGreen Int

The amount of green that the instance's image_blend will change by.

  • byBlue Int

The amount of blue that the instance's image_blend will change by.

  • easeFunc Function ID

The easing function to use for the transition.

  • durationSecs Real

The duration in seconds that the action should take to run.

Returns
PRAction Struct

An action that can be played by a PRAction-derived object.

PRActionCreateBlendTo(blendToColour, durationSecs)

Description

Creates and returns an action of type PRACTION_TYPE_BLEND_TO. When an oPRAction-derived object instance plays this action, that object instance will have its image_blend value smoothly change from its current colour value to the new blendToColour value over a period of durationSecs seconds. The animation curve used in this transition is governed by the easing function provided in easeFunc, which can be one of the PRActionEase* functions.

Parameters
  • blendToColour Colour

The new image_blend colour value to transition to.

  • easeFunc Function ID

The easing function to use for the transition.

  • durationSecs Real

The duration in seconds that the action should take to run.

Returns
PRAction Struct

An action that can be played by a PRAction-derived object.

PRActionCreateCustomColourScript(scriptId, fromColour, toColour, easeFunc, durationSecs)

Description

Creates and returns an action of type PRACTION_TYPE_CUSTOM_COLOUR_SCRIPT. When an oPRAction-derived object instance plays this action, the given script will be called within the context of that object instance. The script will receive 1 parameter containing a colour value undergoing a smooth transition from the given fromColour to the given toColour over a period of durationSecs seconds. The script will be called every frame until the transition is complete. The animation curve used in this transition is governed by the easing function provided in easeFunc, which can be one of the PRActionEase* functions.

Parameters
  • scriptId Script ID

The script id to run.

  • fromColour Colour

The starting colour value of the transition.

  • toColour Colour

The ending colour value of the transition.

  • easeFunc Function ID

The easing function to use for the transition.

  • durationSecs Real

The duration in seconds that the action should take to run.

Returns
PRAction Struct

An action that can be played by a PRAction-derived object.

PRActionCreateCustomColourVarBy(varName, byRed, byGreen, byBlue, easeFunc, durationSecs)

Description

Creates and returns an action of type PRACTION_TYPE_CUSTOM_COLOUR_VAR_BY. When an oPRAction-derived object instance plays this action, that instance's variable with the name specified in varName will smoothly change from it's current colour value by the given byRed, byGreen and byBlue component values (which can be positive or negative) over a period of durationSecs seconds. The animation curve used in this transition is governed by the easing function provided in easeFunc, which can be one of the PRActionEase* functions.

Parameters
  • varName String

The variable name.

  • byRed Int

The value that the colour's red component will change by over time.

  • byGreen Int

The value that the colour's green component will change by over time.

  • byBlue Int

The value that the colour's blue component will change by over time.

  • easeFunc Function ID

The easing function to use for the transition.

  • durationSecs Real

The duration in seconds that the action should take to run.

Returns
PRAction Struct

An action that can be played by a PRAction-derived object.

PRActionCreateCustomColourVarTo(varName, toColour, easeFunc, durationSecs)

Description

Creates and returns an action of type PRACTION_TYPE_CUSTOM_COLOUR_VAR_TO. When an oPRAction-derived object instance plays this action, that instance's variable with the name specified in varName will smoothly change from it's current colour value to the colour value given in toColour over a period of durationSecs seconds. The animation curve used in this transition is governed by the easing function provided in easeFunc, which can be one of the PRActionEase* functions.

Parameters
  • varName String

The variable name.

  • toColour Colour

The colour value that the variable should change to over time.

  • easeFunc Function ID

The easing function to use for the transition.

  • durationSecs Real

The duration in seconds that the action should take to run.

Returns
PRAction Struct

An action that can be played by a PRAction-derived object.

PRActionCreateCustomScript1(scriptId, fromValue, toValue, easeFunc, durationSecs)

Description

Creates and returns an action of type PRACTION_TYPE_CUSTOM_SCRIPT_1. When an oPRAction-derived object instance plays this action, the given script will be called within the context of that object instance. The script will receive 1 parameter containing a real number value undergoing a smooth transition from the given fromValue to the given toValue over a period of durationSecs seconds. The script will be called every frame until the transition is complete. The animation curve used in this transition is governed by the easing function provided in easeFunc, which can be one of the PRActionEase* functions.

Parameters
  • scriptId Script ID

The script id to run.

  • fromValue Real

The starting value of the transition.

  • toValue Real

The ending value of the transition.

  • easeFunc Function ID

The easing function to use for the transition.

  • durationSecs Real

The duration in seconds that the action should take to run.

Returns
PRAction Struct

An action that can be played by a PRAction-derived object.

PRActionCreateCustomScript2(scriptId, fromValue1, fromValue2, toValue1, toValue2, easeFunc, durationSecs)

Description

Creates and returns an action of type PRACTION_TYPE_CUSTOM_SCRIPT_2. When an oPRAction-derived object instance plays this action, the given script will be called within the context of that object instance. The script will receive 2 parameters containing real number values undergoing smooth transitions from the given fromValue1 and fromValue2 to the given toValue1 and toValue2 over a period of durationSecs seconds. The script will be called every frame until the transition is complete. The animation curve used in this transition is governed by the easing function provided in easeFunc, which can be one of the PRActionEase* functions.

Parameters
  • scriptId Script ID

The script id to run.

  • fromValue1 Real

The 1st starting value of the transition.

  • fromValue2 Real

The 2nd starting value of the transition.

  • toValue1 Real

The 1st ending value of the transition.

  • toValue2 Real

The 2nd ending value of the transition.

  • easeFunc Function ID

The easing function to use for the transition.

  • durationSecs Real

The duration in seconds that the action should take to run.

Returns
PRAction Struct

An action that can be played by a PRAction-derived object.

PRActionCreateCustomVarBy(varName, byValue, easeFunc, durationSecs)

Description

Creates and returns an action of type PRACTION_TYPE_CUSTOM_VAR_BY. When an oPRAction-derived object instance plays this action, that instance's variable with the name specified in varName will smoothly change from it's current real number value by the real number value given in byValue over a period of durationSecs seconds. The animation curve used in this transition is governed by the easing function provided in easeFunc, which can be one of the PRActionEase* functions.

Parameters
  • varName String

An instance variable name that stores a real number.

  • byValue Real

The real number value that the variable will change by over time.

  • easeFunc Function ID

The easing function to use for the transition.

  • durationSecs Real

The duration in seconds that the action should take to run.

Returns
PRAction Struct

An action that can be played by a PRAction-derived object.

PRActionCreateCustomVarTo(varName, toValue, easeFunc, durationSecs)

Description

Creates and returns an action of type PRACTION_TYPE_CUSTOM_VAR_TO. When an oPRAction-derived object instance plays this action, that instance's variable with the name specified in varName will smoothly change from it's current real number value to the real number value given in toValue over a period of durationSecs seconds. The animation curve used in this transition is governed by the easing function provided in easeFunc, which can be one of the PRActionEase* functions.

Parameters
  • varName String

An instance variable name that stores a real number.

  • toValue Real

The real number value that the variable should change to over time.

  • easeFunc Function ID

The easing function to use for the transition.

  • durationSecs Real

The duration in seconds that the action should take to run.

Returns
PRAction Struct

An action that can be played by a PRAction-derived object.

PRActionCreateImageSpeedBy(imageSpeedBy, easeFunc, durationSecs)

Description

Creates and returns an action of type PRACTION_TYPE_IMAGE_SPEED_BY. When an oPRAction-derived object instance plays this action, that object instance's image_speed value will smoothly change by the amount specified in imageSpeedBy over a period of durationSecs seconds. The animation curve used in this transition is governed by the easing function provided in easeFunc, which can be one of the PRActionEase* functions.

Parameters
  • imageSpeedBy Real

The amount that the instance's image_speed will change by.

  • easeFunc Function ID

The easing function to use for the transition.

  • durationSecs Real

The duration in seconds that the action should take to run.

Returns
PRAction Struct

An action that can be played by a PRAction-derived object.

PRActionCreateImageSpeedTo(imageSpeedTo, easeFunc, durationSecs)

Description

Creates and returns an action of type PRACTION_TYPE_IMAGE_SPEED_TO. When an oPRAction-derived object instance plays this action, that object instance's image_speed value will smoothly change from its current value to the new imageSpeedTo value over a period of durationSecs seconds. The animation curve used in this transition is governed by the easing function provided in easeFunc, which can be one of the PRActionEase* functions.

Parameters
  • imageSpeedTo Real

The new image_speed to transition to.

  • easeFunc Function ID

The easing function to use for the transition.

  • durationSecs Real

The duration in seconds that the action should take to run.

Returns
PRAction Struct

An action that can be played by a PRAction-derived object.

PRActionCreateMoveBy(moveByX, moveByY, easeFunc, durationSecs)

Description

Creates and returns an action of type PRACTION_TYPE_MOVE_BY. When an oPRAction-derived object instance plays this action, that object instance will smoothly move from its current x/y room coordinates by the given moveByX and moveByY amounts over a period of durationSecs seconds. The animation curve used in this transition is governed by the easing function provided in easeFunc, which can be one of the PRActionEase* functions.

Parameters
  • moveByX Real

The amount that the object instance will move by along the x-axis.

  • moveByY Real

The amount that the object instance will move by along the y-axis.

  • easeFunc Function ID

The easing function to use for the transition.

  • durationSecs Real

The duration in seconds that the action should take to run.

Returns
PRAction Struct

An action that can be played by a PRAction-derived object.

PRActionCreateMoveTo(moveToX, moveToY, easeFunc, durationSecs)

Description

Creates and returns an action of type PRACTION_TYPE_MOVE_TO. When an oPRAction-derived object instance plays this action, that object instance will smoothly move from its current x/y room coordinates to the given moveToX and moveToY room coordinates over a period of durationSecs seconds. The animation curve used in this transition is governed by the easing function provided in easeFunc, which can be one of the PRActionEase* functions.

Parameters
  • moveToX Real

The x coordinate that the object instance will move to.

  • moveToY Real

The y coordinate that the object instance will move to.

  • easeFunc Function ID

The easing function to use for the transition.

  • durationSecs Real

The duration in seconds that the action should take to run.

Returns
PRAction Struct

An action that can be played by a PRAction-derived object.

PRActionCreateMoveXBy(moveByX, easeFunc, durationSecs)

Description

Creates and returns an action of type PRACTION_TYPE_MOVE_X_BY. When an oPRAction-derived object instance plays this action, that object instance will smoothly move from its current x room coordinate by the given moveByX amount over a period of durationSecs seconds. The animation curve used in this transition is governed by the easing function provided in easeFunc, which can be one of the PRActionEase* functions.

Parameters
  • moveByX Real

The amount that the object instance will move by along the x-axis.

  • easeFunc Function ID

The easing function to use for the transition.

  • durationSecs Real

The duration in seconds that the action should take to run.

Returns
PRAction Struct

An action that can be played by a PRAction-derived object.

PRActionCreateMoveXTo(moveToX, easeFunc, durationSecs)

Description

Creates and returns an action of type PRACTION_TYPE_MOVE_X_TO. When an oPRAction-derived object instance plays this action, that object instance will smoothly move from its current x room coordinate to the given moveToX room coordinate over a period of durationSecs seconds. The animation curve used in this transition is governed by the easing function provided in easeFunc, which can be one of the PRActionEase* functions.

Parameters
  • moveToX Real

The x coordinate that the object instance will move to.

  • easeFunc Function ID

The easing function to use for the transition.

  • durationSecs Real

The duration in seconds that the action should take to run.

Returns
PRAction Struct

An action that can be played by a PRAction-derived object.

PRActionCreateMoveYBy(moveByY, easeFunc, durationSecs)

Description

Creates and returns an action of type PRACTION_TYPE_MOVE_Y_BY. When an oPRAction-derived object instance plays this action, that object instance will smoothly move from its current y room coordinate by the given moveByY amount over a period of durationSecs seconds. The animation curve used in this transition is governed by the easing function provided in easeFunc, which can be one of the PRActionEase* functions.

Parameters
  • moveByY Real

The amount that the object instance will move by along the y-axis.

  • easeFunc Function ID

The easing function to use for the transition.

  • durationSecs Real

The duration in seconds that the action should take to run.

Returns
PRAction Struct

An action that can be played by a PRAction-derived object.

PRActionCreateMoveYTo(moveToY, easeFunc, durationSecs)

Description

Creates and returns an action of type PRACTION_TYPE_MOVE_Y_TO. When an oPRAction-derived object instance plays this action, that object instance will smoothly move from its current y room coordinate to the given moveToY room coordinate over a period of durationSecs seconds. The animation curve used in this transition is governed by the easing function provided in easeFunc, which can be one of the PRActionEase* functions.

Parameters
  • moveToY Real

The y coordinate that the object instance will move to.

  • easeFunc Function ID

The easing function to use for the transition.

  • durationSecs Real

The duration in seconds that the action should take to run.

Returns
PRAction Struct

An action that can be played by a PRAction-derived object.

PRActionCreateRotateBy(rotateBy, easeFunc, durationSecs)

Description

Creates and returns an action of type PRACTION_TYPE_ROTATE_BY. When an oPRAction-derived object instance plays this action, that object instance will rotate smoothly from its current rotation value by the new rotation amount specified in rotateBy over a period of durationSecs seconds. The animation curve used in this transition is governed by the easing function provided in easeFunc, which can be one of the PRActionEase* functions.

Parameters
  • rotateBy Real

The amount that the instance will rotate by.

  • easeFunc Function ID

The easing function to use for the transition.

  • durationSecs Real

The duration in seconds that the action should take to run.

Returns
PRAction Struct

An action that can be played by a PRAction-derived object.

PRActionCreateRotateTo(rotateTo, easeFunc, durationSecs)

Description

Creates and returns an action of type PRACTION_TYPE_ROTATE_TO. When an oPRAction-derived object instance plays this action, that object instance will rotate smoothly from its current rotation value to the new rotation value specified in rotateTo over a period of durationSecs seconds. The animation curve used in this transition is governed by the easing function provided in easeFunc, which can be one of the PRActionEase* functions.

Parameters
  • rotateTo Real

The new rotation angle to transition to.

  • easeFunc Function ID

The easing function to use for the transition.

  • durationSecs Real

The duration in seconds that the action should take to run.

Returns
PRAction Struct

An action that can be played by a PRAction-derived object.

PRActionCreateScaleBy(scaleBy, easeFunc, durationSecs)

Description

Creates and returns an action of type PRACTION_TYPE_SCALE_BY. When an oPRAction-derived object instance plays this action, that object instance will smoothly scale from its current size by the given scaleBy amount over a period of durationSecs seconds. The animation curve used in this transition is governed by the easing function provided in easeFunc, which can be one of the PRActionEase* functions.

Parameters
  • scaleBy Real

The amount that the object instance will scale by.

  • easeFunc Function ID

The easing function to use for the transition.

  • durationSecs Real

The duration in seconds that the action should take to run.

Returns
PRAction Struct

An action that can be played by a PRAction-derived object.

PRActionCreateScaleTo(scaleTo, easeFunc, durationSecs)

Description

Creates and returns an action of type PRACTION_TYPE_SCALE_TO. When an oPRAction-derived object instance plays this action, that object instance will smoothly scale from its current size to the given scaleTo factor over a period of durationSecs seconds. The animation curve used in this transition is governed by the easing function provided in easeFunc, which can can be one of the PRActionEase* functions.

Parameters
  • scaleTo Real

The scale factor the object instance will scale to.

  • easeFunc Function ID

The easing function to use for the transition.

  • durationSecs Real

The duration in seconds that the action should take to run.

Returns
PRAction Struct

An action that can be played by a PRAction-derived object.

PRActionCreateScaleXBy(scaleByX, easeFunc, durationSecs)

Description

Creates and returns an action of type PRACTION_TYPE_SCALE_X_BY. When an oPRAction-derived object instance plays this action, that object instance will smoothly move from its current x scale factor by the given scaleByX amount over a period of durationSecs seconds. The animation curve used in this transition is governed by the easing function provided in easeFunc, which can be one of the PRActionEase* functions.

Parameters
  • scaleByX Real

The amount that the object instance will scale by along the x-axis.

  • easeFunc Function ID

The easing function to use for the transition.

  • durationSecs Real

The duration in seconds that the action should take to run.

Returns
PRAction Struct

An action that can be played by a PRAction-derived object.

PRActionCreateScaleXTo(scaleToX, easeFunc, durationSecs)

Description

Creates and returns an action of type PRACTION_TYPE_SCALE_X_TO. When an oPRAction-derived object instance plays this action, that object instance will smoothly scale from its current x scale factor to the given scaleToX factor over a period of durationSecs seconds. The animation curve used in this transition is governed by the easing function provided in easeFunc, which can be one of the PRActionEase* functions.

Parameters
  • scaleToX Real

The scale factor that the object instance will scale to along the x axis.

  • easeFunc Function ID

The easing function to use for the transition.

  • durationSecs Real

The duration in seconds that the action should take to run.

Returns
PRAction Struct

An action that can be played by a PRAction-derived object.

PRActionCreateScaleYBy(scaleByY, easeFunc, durationSecs)

Description

Creates and returns an action of type PRACTION_TYPE_SCALE_Y_BY. When an oPRAction-derived object instance plays this action, that object instance will smoothly move from its current y scale factor by the given scaleByY amount over a period of durationSecs seconds. The animation curve used in this transition is governed by the easing function provided in easeFunc, which can be one of the PRActionEase* functions.

Parameters
  • scaleByY Real

The amount that the object instance will scale by along the x-axis.

  • easeFunc Function ID

The easing function to use for the transition.

  • durationSecs Real

The duration in seconds that the action should take to run.

Returns
PRAction Struct

An action that can be played by a PRAction-derived object.

PRActionCreateScaleYTo(scaleToY, easeFunc, durationSecs)

Description

Creates and returns an action of type PRACTION_TYPE_SCALE_Y_TO. When an oPRAction-derived object instance plays this action, that object instance will smoothly scale from its current y scale factor to the given scaleToY factor over a period of durationSecs seconds. The animation curve used in this transition is governed by the easing function provided in easeFunc, which can be one of the PRActionEase* functions.

Parameters
  • scaleToY Real

The scale factor that the object instance will scale to along the y axis.

  • easeFunc Function ID

The easing function to use for the transition.

  • durationSecs Real

The duration in seconds that the action should take to run.

Returns
PRAction Struct

An action that can be played by a PRAction-derived object.

PRActionCreateWait(durationSecs)

Description

Creates and returns an action of type PRACTION_TYPE_WAIT. When an oPRAction-derived object instance plays this action, nothing happens for a period of durationSecs seconds.

Parameters
  • durationSecs Real

The duration in seconds that the action should take to run.

Returns
PRAction Struct

An action that can be played by a PRAction-derived object.


© 2021 Prismatic Realms, Inc. Contact

Green Hosting Badge