Actions API Reference


Actions are pieces of complete functionality that can be bolted together and executed either consecutively / simultaneously to add extra functionality to Actors and Scenes.

Whilst a large collection of pre-defined actions have been created for you, you can easily create and register actions of your own. To find out how to create see the creating actions section,

This section contains a list of pre-defined actions that are currently supported by Booty5:

Action List Actions

The A_ChangeActions action changes the state of an actions list then exits

  • actions – Path to actions list (e.g. scene1.actor1.actionslist1)
  • action – Action to perform on the actions list (play, pause or restart)

Actor Actions

The A_CreateExplosion action creates a particle system actor then exits

  • container – Path to scene or actor that will contain the generated particle actor (e.g. scene1.actor1)
  • count – Total number of particles to create
  • type – The actor type of each particle created, for example ArcActor
  • duration – The total duration of the particle system in seconds
  • speed – The speed at which the particles blow apart
  • spin_speed – The speed at which particles spin
  • rate – Rate at which particles are created
  • damping – A factor to reduce velocity of particles each frame, values greater than 1 will increase velocities
  • properties – A collection of actor specific properties that will be assigned to each created particle (e.g. vx=10,vy=10)
  • actor – If provided then the generated particle actor will be placed at the same position and orientation as this actor, actor is path to an actor

The A_CreatePlume action creates a particle system actor then exits

  • container – Path to scene or actor that will contain the generated particle actor (e.g. scene1.actor1)
  • count – Total number of particles to create
  • type – The actor type of each particle created, for example ArcActor
  • duration – The total duration of the particle system in seconds
  • speed – The speed at which the particles rise
  • spin_speed – The speed at which particles spin
  • rate – Rate at which particles are created
  • damping – A factor to reduce velocity of particles each frame, values greater than 1 will increase velocities
  • properties – A collection of actor specific properties that will be assigned to each created particle (e.g. vx=10,vy=10)
  • actor – If provided then the generated particle actor will be placed at the same position and orientation as this actor, actor is path to an actor

Animation Actions

The A_ChangeTimeline action changes the state of an animation timeline then exits

  • timeline – Path to timeline (e.g. scene1.actor1.timeline1)
  • action – Action to perform on the timeline (play, pause or restart)

Attractor Actions

The A_AttractX action pulls objects towards or repels objects away on the x-axis that are within a specific range, does not exit

  • target – Path to actor object that will attract other objects (e.g. scene1.actor1)
  • container – Path to object that contains the actors (actors that can be attracted have attract property set to true)
  • min_x – Minimum x-axis attraction range
  • max_x – Maximum x-axis attraction range
  • min_y – Minimum y-axis inclusion range
  • max_y – Maximum y-axis inclusion range
  • strength – Strength of attraction, negative for repulsion
  • stop – If set to true then attracted objects will stop when they hit the minimum distance range
  • bounce – If set to true then objects when stopped at the minimum distance range will bounce

The A_AttractY action pulls objects towards or repels objects away on the y-axis that are within a specific range, does not exit

  • target – Path to actor object that will attract other objects (e.g. scene1.actor1)
  • container – Path to object that contains the actors (actors that can be attracted have attract property set to true)
  • min_y – Minimum y-axis attraction range
  • max_y – Maximum y-axis attraction range
  • min_x – Minimum x-axis inclusion range
  • max_x – Maximum x-axis inclusion range
  • strength – Strength of attraction, negative for repulsion
  • stop – If set to true then attracted objects will stop when they hit the minimum distance range
  • bounce – If set to true then objects when stopped at the minimum distance range will bounce

The A_Attract action pulls objects towards or repels objects away on the x and y-axis that are within a specific range, does not exit

  • target – Path to actor object that will attract other objects (e.g. scene1.actor1)
  • container – Path to object that contains the actors (actors that can be attracted have attract property set to true)
  • min_dist – Minimum attraction range
  • max_dist – Maximum attraction range
  • strength – Strength of attraction, negative for repulsion
  • stop – If set to true then attracted objects will stop when they hit the minimum distance range
  • bounce – If set to true then objects when stopped at the minimum distance range will bounce

Audio Actions

The A_Sound action plays, pauses or stops a sound then exits

  • name – Path to sound resource (e.g. scene1.sound1)
  • action – Action to perform on sound (play, pause or stop)

General Actions

The A_Wait action waits for a specified time then exits

  • duration – Amount of time to wait

The A_SetProps action sets a group of properties of an object to specified values then exits

  • target – Path to target object (e.g. scebe1.actor1)
  • properties – Property / value pairs that will be set (e.g. vx=0,vy=0)

The A_AddProps action adds the specified values onto the specified properties then exits

  • target – Path to target object (e.g. scebe1.actor1)
  • properties – Property / value pairs that will be updated (e.g. vx=0,vy=0)

The A_TweenProps action tweens the specified property values over time then exits

  • target – Path to or instance of target object (e.g. scene1.actor1)
  • properties – Property / value pairs that will be tweened (e.g. vx=0,vy=0)
  • start – Array of start values (e.g. 0,0)
  • end – Array of end values (e.g. 100,500)
  • duration – Amount of time to tween over
  • ease – Array of easing functions to apply to tweens

The A_Call action calls a function then exits

  • func – Function to call
  • params – Parameter to pass to function (passed to function as an array)

The A_Create action creates an object from a xoml template then exits

  • objects – Collection of objects in XOML JSON format (as exported from Booty5 editor) that contains the template (e.g. gamescene)
  • scene – Path to scene that contains the template and its resources (e.g. gamescene)
  • template – The name of the object template (e.g. actor1)
  • type – The type of object (e.g. icon, label, scene etc)
  • properties – Property / value pairs that will be set to created object (e.g. vx=0,vy=0)

The A_Destroy action destroys an object then exits

  • target – Path to object to destroy (e.g. scene1.actor1)

The A_FocusScene action sets the current focus scene then exits

  • target – Path to scene to set as focus
  • focus2 – Set as secondary focus instead

The A_Custom action is used to call your own custom actions (Booty5 editor only)

  • name – Name of custom action
  • target – Path to actor or scene
  • params – Parameter to pass to function (passed to function as an array)

Movement Actions

The A_StopMove action stops an object from moving then exits

  • target – Path to target object (e.g. scene1.actor1)
  • stop_vx – Stops x velocity
  • stop_vy – Stops y velocity
  • stop_vr – Stops rotational velocity
  • duration – Amount of time to wait before stopping

The A_Gravity action applies gravity to an object, does not exit

  • target – Path to target object (e.g. scene1.actor1)
  • gravity_x – Gravity strength on x-axis
  • gravity_y – Gravity strength on y-axis

The A_Move action moves an object dx, dy units over the specified time then exits

  • target – Path to target object (e.g. scene1.actor1)
  • dx, dy – Distances to move on x and y axis
  • duration – Amount of time to move over

The A_MoveTo action moves an object to a specific coordinate over the specified time then exits

  • target – Path to target object (e.g. scene1.actor1)
  • x, y – Target position to move to
  • duration – Amount of time to move over
  • ease_x – Easing function to use on x-axis
  • ease_y – Easing function to use on y-axis

The A_MoveWithSpeed action moves an object at specific speed in its current direction over the specified time then exits

  • target – Path to target object (e.g. scene1.actor1)
  • speed – Speed at which to move
  • duration – Amount of time to move over
  • ease – Easing function used to increase to target speed

The A_Follow action follows a target, does not exit

  • source – Path to target object (e.g. scene1.actor1)
  • target – Path to target object (e.g. scene1.actor2)
  • speed – Speed at which to follow, larger values will catch up with target slower
  • distance – Minimum distance allowed between source and target (squared)

The A_LookAt action turns an object to face an object, does not exit

  • source – Path to target object (e.g. scene1.actor1)
  • target – Path to target object (e.g. scene1.actor2)
  • lower – Lower limit angle
  • upper – Upper limit angle

The A_FollowPath action follows a path, does not exit

  • target – Path to target object (e.g. scene1.actor2)
  • path – Path to shape to follow (e.g. ecene1.shape1)
  • start – Distance to start along the path
  • speed – Speed at which to travel down the path
  • angle – If set to true then angle will adjust to path direction

The A_FollowPathVel action follows a path using velocity, does not exit

  • target – Path to target object (e.g. scene1.actor2)
  • path – Path to shape to follow (e.g. ecene1.shape1)
  • start – Distance to start along the path
  • speed – Speed at which to travel down the path
  • catchup_speed – Speed at which object catches up with path target modes
  • angle – If set to true then angle will adjust to path direction

The A_LimitMove action limits movement of object to within a rectangular area, does not exit

  • target – Path to target object (e.g. scene1.actor2)
  • area – Rectangular area limit [x,y,w,h] (e.g. -100,-100,100,100)
  • hit – Action to perform when object oversteps boundary (bounce, wrap, stop)
  • bounce – Bounce factor

Camera Actions

The A_CamStopMove action stops a scene camera from moving then exits

  • target – Path to target scene that contains camera (e.g. scene1)
  • stop_vx – Stops x velocity
  • stop_vy – Stops y velocity
  • duration – Amount of time wait before stopping

The A_CamGravity action applies gravity ti a scene camera, does not exit

  • target – Path to target scene that contains camera (e.g. scene1)
  • gravity_x – Gravity strength on x-axis
  • gravity_y – Gravity strength on y-axis

The A_CamMove action moves a scene camera dx, dy units over the specified time then exits

  • target – Path to target scene that contains camera (e.g. scene1)
  • dx, dy – Distances to move on x and y axis
  • duration – Amount of time to move over

The A_CamMoveTo action moves a scene camera to a specific coordinate over the specified time then exits

  • target – Path to target scene that contains camera (e.g. scene1)
  • x, y – Target position to move to
  • duration – Amount of time to move over
  • ease_x – Easing function to use on x-axis
  • ease_y – Easing function to use on y-axis

The A_CamFollow action causes scene camera to follow a target, does not exit

  • source – Path to scene that contains camera that will follow the target (e.g. scene1)
  • target – Path to target object to follow
  • speed – Speed at which to follow, larger values will catch up with target slower
  • distance – Minimum distance allowed between source and target (squared)

The A_CamFollowPath action causes scene camera to follows a path, does not exit

  • target – Path to target scene that contains camera (e.g. scene1)
  • path – Path to shape to follow
  • start – Distance to start along the path
  • speed – Speed at which to travel down the path

The A_CamFollowPathVel action causes scene camera to follow a path using velocity, does not exit

  • target – Path to target scene that contains camera (e.g. scene1)
  • path – Path to shape to follow (e.g. ecene1.shape1)
  • start – Distance to start along the path
  • speed – Speed at which to travel down the path
  • catchup_speed – Speed at which object catches up with path target modes

The A_CamLimitMove action limits movement of scene camera to within a rectangular area, does not exit

  • target – Path to target scene that contains camera (e.g. scene1)
  • area – Rectangular area limit [x,y,w,h] (e.g. -100,-100,100,100)
  • hit – Action to perform when object oversteps boundary (bounce, wrap, stop)
  • bounce – Bounce factor

Physics Actions

The A_SetLinearVelocity action sets the linear velocity of an actors body for a duration then exits

  • target – Path to actor that will be changed
  • vx – x-axis velocity
  • vy – y-axis velocity
  • duration – Duration of action

The A_SetAngularVelocity action sets the angular velocity of an actors body for a duration then exits

  • target – Path to actor that will be changed
  • vr – Angular velocity
  • duration – Duration of action

The A_ApplyForce action applies force to an object over a period of time then exits

  • target – Path to actor that will be changed
  • fx – x-axis force
  • fy – y-axis force
  • dx – x-axis offset to apply force
  • dy – y-axis offset to apply force
  • duration – Duration of action

The A_ApplyImpulse action applies an impulse to an object then exits

  • target – Path to actor that will be changed
  • ix – x-axis impulse
  • iy – y-axis impulse
  • dx – x-axis offset to apply force
  • dy – y-axis offset to apply force

The A_ApplyTorque action applies torque to an object over a period of time then exits

  • target – Path to actor that will be changed
  • torque – Torque
  • duration – Duration of action

 

628 total views, 1 views today