Module Actions

List of all predefined actions you can use

Functions

value(variable_name, field) Return value from FSM variables for action params

actions.debug Functions

actions.debug.print(text[, is_every_frame[, is_every_second]]) Print text to console
actions.debug.event(event_name) Instantly trigger event.
actions.debug.callback(callback, delay) Call callback on event trigger

actions.fsm Functions

actions.fsm.send_event(target, event_name[, delay[, is_every_frame]]) Send event to target Adam instance.
actions.fsm.broadcast_event(event_name[, is_exclude_self[, delay]]) Broadcast event to all active FSM.
actions.fsm.resume(string[, delay]) Resume the Adam Instance
actions.fsm.pause(string[, delay]) Pause the Adam Instance
actions.fsm.final(string[, delay]) Finalize the Adam Instance
actions.fsm.get_value(string, variable, store_value[, is_every_frame]) Get variable from FSM.
actions.fsm.get_adam(string, store_value[, is_every_frame]) Get adam from adam_id
actions.fsm.set_value(string, variable, source[, is_every_frame]) Set variable from FSM.

actions.go Functions

actions.go.create_object(factory_url[, position[, variable[, delay[, scale[, rotation[, properties]]]]]]) Spawn game object via factory
actions.go.create_objects(collection_factory_url[, position[, variable[, delay[, scale[, rotation[, properties]]]]]]) Spawn game objects via collection factory
actions.go.delete_self([delay[, not_recursive]]) Delete the current game object Useful for game objects that need to kill themselves, for example a projectile that explodes on impact.
actions.go.delete_object([target="."[, delay[, not_recursive]]]) Delete the game object
actions.go.delete_objects(target_ids[, delay[, not_recursive]]) Delete the game objects
actions.go.enable([target="."[, delay]]) Enable the receiving component
actions.go.disable([target="."[, delay]]) Disable the receiving component

actions.input Functions

actions.input.get_action(action_id[, variable[, in_update_only[, trigger_event]]]) Check is action_id is active now.
actions.input.get_action_pressed(action_id[, variable[, in_update_only[, trigger_event]]]) Check is action_id was pressed.
actions.input.get_action_released(action_id[, variable[, in_update_only[, trigger_event]]]) Check is action_id was released.
actions.input.get_sprite_action(action_id, sprite_url[, variable[, in_update_only[, trigger_event]]]) Check is action_id is active now on sprite_url
actions.input.get_sprite_action_pressed(action_id, sprite_url[, variable[, in_update_only[, trigger_event]]]) Check is action_id is active now on sprite_url
actions.input.get_sprite_action_released(action_id, sprite_url[, variable[, in_update_only[, trigger_event]]]) Check is action_id is active now on sprite_url
actions.input.get_axis_actions(negative_action, positive_action, variable[, is_every_frame[, multiplier=1]]) Imitate two keys as axis.

actions.logic Functions

actions.logic.all_true(variables_array[, trigger_event[, is_every_frame]]) Sends an event if all the variables are true
actions.logic.any_true(variables_array[, trigger_event[, is_every_frame]]) Sends an event if any of the variables are true
actions.logic.all_false(variables_array[, trigger_event[, is_every_frame]]) Sends an event if all the variables are false
actions.logic.changed(variable[, trigger_event[, store_result]]) Tests if the value of a variable has changed.
actions.logic.test(variable[, event_on_true[, event_on_false[, store_result[, is_every_frame]]]]) Send events based on the value of a variable.
actions.logic.compare(variable_a, variable_b[, event_equal[, event_less[, event_greater[, is_every_frame[, tolerance=0]]]]]) Send events based on the variables comparsion (numbers)
actions.logic.equals(variable_a, variable_b[, event_equal[, event_not_equal[, is_every_frame]]]) Check equals on two variables

actions.math Functions

actions.math.set(source, value[, is_every_frame[, is_every_second]]) Set a value to a variable
actions.math.add(source, value[, is_every_frame[, is_every_second]]) Adds a value to a variable
actions.math.subtract(source, value[, is_every_frame[, is_every_second]]) Subtracts a value from a variable
actions.math.multiply(source, value[, is_every_frame]) Multiplies a variable by another value
actions.math.divide(source, value[, is_every_frame]) Divides a value by another value
actions.math.clamp(source, min, max[, is_every_frame[, is_every_second]]) Clamps the value of a variable to a min/max range.
actions.math.loop(source, min, max[, is_every_frame[, is_every_second]]) Loop value in range.
actions.math.min(source, min[, is_every_frame[, is_every_second]]) Choose min value
actions.math.max(source, min[, is_every_frame[, is_every_second]]) Choose max value
actions.math.abs(source[, is_every_frame]) Sets a float variable to its absolute value.
actions.math.random(source, min, max[, is_every_frame[, is_every_second]]) Sets a variable to a random value between min/max.
actions.math.random_boolean(source[, is_every_frame[, is_every_second]]) Sets a variable to a random value true or false
actions.math.cos(value, store_variable[, is_degrees[, is_every_frame]]) Get a cos value
actions.math.sin(value, store_variable[, is_degrees[, is_every_frame]]) Get a sin value
actions.math.asin(value, store_variable[, is_degrees[, is_every_frame]]) Get a asin value
actions.math.acos(value, store_variable[, is_degrees[, is_every_frame]]) Get a acos value
actions.math.tan(value, store_variable[, is_degrees[, is_every_frame]]) Get a tan value
actions.math.atan(value, store_variable[, is_degrees[, is_every_frame]]) Get a atan value
actions.math.atan2(value, store_variable[, is_degrees[, is_every_frame]]) Get a atan2 value
actions.math.operator(source_variable_a, variable_b, operator[, is_every_frame]) Apply a math function (a, b, adam_instance)=>c to source variable.

actions.msg Functions

actions.msg.post(target, message_id[, message[, delay]]) Post message via msg.post

actions.physics Functions

get_trigger_info(string, string, string) Get info about last trigger event

actions.sprite Functions

actions.sprite.play_flipbook(image[, The[, finish_event[, delay[, The]]]]) Play the flipbook for target url.
actions.sprite.set_tint(tint[, is_every_frame[, delay[, The="sprite"}[, target_url]]]]) Set the tint to the sprite component
actions.sprite.add_tint(tint[, is_every_frame[, delay[, The="sprite"}[, target_url]]]]) Add the tint to the sprite component
actions.sprite.animate_tint(tint, time[, finish_event[, delay[, ease_function[, The="sprite"}[, target_url]]]]]) Animate the tint to the sprite component
actions.sprite.animate_tint_by(tint, time[, finish_event[, delay[, ease_function[, The="sprite"}[, target_url]]]]]) Animate the tint of the sprite component with relative tint vector
actions.sprite.get_tint(variable[, is_every_frame[, The="sprite"}[, target_url]]]) Get the tint property of a game object and store to variable
actions.sprite.set_alpha(alpha[, is_every_frame[, delay[, The="sprite"}[, target_url]]]]) Set the alpha to the sprite component
actions.sprite.add_alpha(alpha[, is_every_frame[, delay[, The="sprite"}[, target_url]]]]) Add the alpha to the sprite component
actions.sprite.animate_alpha(alpha, time[, finish_event[, delay[, ease_function[, The="sprite"}[, target_url]]]]]) Animate the alpha to the sprite component
actions.sprite.animate_alpha_by(alpha, time[, finish_event[, delay[, ease_function[, The="sprite"}[, target_url]]]]]) Animate the alpha of the sprite component with relative alpha vector
actions.sprite.get_alpha(variable[, is_every_frame[, The="sprite"}[, target_url]]]) Get the alpha property of a game object and store to variable
actions.sprite.set_vflip(is_flip[, The[, is_every_frame[, delay[, The]]]]) Set vertical flip for the sprite
actions.sprite.set_hflip(is_flip[, The[, is_every_frame[, delay[, The]]]]) Set horizontal flip for the sprite

actions.template Functions

func(source, value, is_every_frame) Add operator

actions.time Functions

actions.time.delay(seconds[, trigger_event]) Trigger event after time elapsed.
actions.time.random_delay(min_seconds, max_seconds[, trigger_event]) Trigger event after random time elapsed.
actions.time.frames(frames[, trigger_event]) Trigger event after amount of frames.

actions.transform Functions

actions.transform.set_position(target_vector[, is_every_frame[, delay[, target_url]]]) Sets the position of a game object
actions.transform.add_position(delta_vector[, is_every_frame[, delay[, target_url]]]) Add the position to a game object
actions.transform.animate_position(target_vector, time[, finish_event[, delay[, ease_function[, target_url]]]]) Animate the position of a game object
actions.transform.animate_position_by(target_vector, time[, finish_event[, delay[, ease_function[, target_url]]]]) Animate the position of a game object by a delta vector
actions.transform.get_position(variable[, is_every_frame[, target_url]]) Get the position property of a game object and store to variable
actions.transform.set_rotation(target_quaternion[, is_every_frame[, delay[, target_url]]]) Sets the rotation of a game object
actions.transform.add_rotation(target_quaternion[, is_every_frame[, delay[, target_url]]]) Add the rotation of a game object
actions.transform.animate_rotation(target_quaternion, time[, finish_event[, delay[, ease_function[, target_url]]]]) Animate the rotation of a game object
actions.transform.animate_rotation_by(target_quaternion, time[, finish_event[, delay[, ease_function[, target_url]]]]) Animate the rotation of a game object with a delta quaternion
actions.transform.get_rotation(variable[, is_every_frame[, target_url]]) Get the rotation property of a game object and store to variable
actions.transform.set_euler(target_euler[, is_every_frame[, delay[, target_url]]]) Sets the euler of a game object
actions.transform.add_euler(target_euler[, is_every_frame[, delay[, target_url]]]) Add the euler of a game object
actions.transform.animate_euler(target_euler, time[, finish_event[, delay[, ease_function[, target_url]]]]) Animate the euler of a game object with euler vector
actions.transform.animate_euler_by(target_euler, time[, finish_event[, delay[, ease_function[, target_url]]]]) Animate the euler of a game object with relative euler vector
actions.transform.get_euler(variable[, is_every_frame[, target_url]]) Get the euler property of a game object and store to variable
actions.transform.set_random_euler([keep_x[, keep_y[, keep_z[, is_every_frame[, delay[, target_url]]]]]]) Sets the random euler of a game object
actions.transform.set_scale(target_scale[, is_every_frame[, delay[, target_url]]]) Set scale to a game object
actions.transform.add_scale(target_scale[, is_every_frame[, delay[, target_url]]]) Add scale to a game object
actions.transform.animate_scale(target_scale, time[, finish_event[, delay[, ease_function[, target_url]]]]) Animate scale to a game object
actions.transform.animate_scale_by(target_scale, time[, finish_event[, delay[, ease_function[, target_url]]]]) Animate scale to a game object with relative vector
actions.transform.get_scale(variable[, is_every_frame[, target_url]]) Get the scale property of a game object and store to variable

actions.vmath Functions

actions.vmath.set_xyz(source[, value_x[, value_y[, value_z[, is_every_frame]]]]) Sets the XYZ channels of a Vector3 variable
actions.vmath.add_xyz(source[, value_x[, value_y[, value_z[, is_every_frame]]]]) Add the XYZ channels of a Vector3 variable
actions.vmath.add(source, variable[, is_every_frame]) Adds a Vector3 value to a Vector3 variable
actions.vmath.get_xyz(source[, value_x[, value_y[, value_z[, is_every_frame]]]]) Get the XYZ channels of a Vector3 variable
actions.vmath.length(variable, store[, is_every_frame]) Get the length of vector to the store value
actions.vmath.multiply(source, value[, is_every_frame]) Multiply a vector by a varialbe
actions.vmath.get_euler(from, from, store[, is_every_frame]) Get euler value between two points
actions.vmath.subtract(source, value[, is_every_frame]) Subtracts a one vector3 from another
actions.vmath.subtract(source[, is_every_frame]) Normalize a vector variable.


Functions

value(variable_name, field)
Return value from FSM variables for action params

Parameters:

  • variable_name string The variable name in Adam instance
  • field string The field name from variable. Useful for vector variables

actions.debug Functions

actions.debug.print(text[, is_every_frame[, is_every_second]])
Print text to console

Parameters:

  • text string The log message
  • is_every_frame boolean Repeat this action every frame (optional)
  • is_every_second bool Repeat this action every second (optional)

Returns:

    ActionInstance
actions.debug.event(event_name)
Instantly trigger event. Useful for test something fast by changing your FSM

Parameters:

  • event_name string The event to send

Returns:

    ActionInstance
actions.debug.callback(callback, delay)
Call callback on event trigger

Parameters:

  • callback function The callback to call
  • delay number Time in seconds

Returns:

    ActionInstance

actions.fsm Functions

actions.fsm.send_event(target, event_name[, delay[, is_every_frame]])
Send event to target Adam instance. Event inside current msg.url() context sent instantly, otherwise it send via msg.post (not instant)

Parameters:

  • target string or adam The target instance for send event. If there are several instances with equal ID, event will be delivered to all of them.
  • event_name string The event to send
  • delay number Time delay in seconds (optional)
  • is_every_frame bool Repeat every frame (optional)

Returns:

    ActionInstance
actions.fsm.broadcast_event(event_name[, is_exclude_self[, delay]])
Broadcast event to all active FSM. Event inside current msg.url() context sent instantly, otherwise it send via msg.post (not instant)

Parameters:

  • event_name string The event to send
  • is_exclude_self bool Don't send the event to self (optional)
  • delay number Time delay in seconds (optional)

Returns:

    ActionInstance
actions.fsm.resume(string[, delay])
Resume the Adam Instance

Parameters:

  • string target |adam target The target instance to resume
  • delay number Time delay in seconds (optional)
actions.fsm.pause(string[, delay])
Pause the Adam Instance

Parameters:

  • string target |adam target The target instance to pause
  • delay number Time delay in seconds (optional)
actions.fsm.final(string[, delay])
Finalize the Adam Instance

Parameters:

  • string target |adam target The target instance to finish
  • delay number Time delay in seconds (optional)
actions.fsm.get_value(string, variable, store_value[, is_every_frame])
Get variable from FSM. If at target will be multiply FSM, no any order which FSM will be used to get value

Parameters:

  • string target |adam target The target instance to get value
  • variable variable Name of variable to get from target FSM
  • store_value string The name of variable in current FSM to store get value
  • is_every_frame boolean Repeat this action every frame (optional)
actions.fsm.get_adam(string, store_value[, is_every_frame])
Get adam from adam_id

Parameters:

  • string adam_id The adam_id for search
  • store_value string The name of variable in current FSM to store get value
  • is_every_frame boolean Repeat this action every frame (optional)
actions.fsm.set_value(string, variable, source[, is_every_frame])
Set variable from FSM. If at target will be multiply FSM, set value to all of them

Parameters:

  • string target |adam target The target instance to set value
  • variable variable Name of variable to set value on target FSM
  • source string The variable in current FSM to set the variable to
  • is_every_frame boolean Repeat this action every frame (optional)

actions.go Functions

actions.go.create_object(factory_url[, position[, variable[, delay[, scale[, rotation[, properties]]]]]])
Spawn game object via factory

Parameters:

  • factory_url url The factory component to be used
  • position vector3 The position to set (optional)
  • variable variable The variable to store created game object id (optional)
  • delay number The Time delay in seconds (optional)
  • scale vector3 The scale to set (optional)
  • rotation vector3 The rotation to set (optional)
  • properties table The properties to set (optional)

Returns:

    ActionInstance
actions.go.create_objects(collection_factory_url[, position[, variable[, delay[, scale[, rotation[, properties]]]]]])
Spawn game objects via collection factory

Parameters:

  • collection_factory_url url The colection factory component to be used
  • position vector3 The position to set (optional)
  • variable variable The variable to store created game object id (optional)
  • delay number The Time delay in seconds (optional)
  • scale vector3 The scale to set (optional)
  • rotation vector3 The rotation to set (optional)
  • properties table The properties to set (optional)

Returns:

    ActionInstance
actions.go.delete_self([delay[, not_recursive]])
Delete the current game object Useful for game objects that need to kill themselves, for example a projectile that explodes on impact.

Parameters:

  • delay number Delay before delete (optional)
  • not_recursive boolean Set true to not delete children of deleted go (optional)

Returns:

    ActionInstance
actions.go.delete_object([target="."[, delay[, not_recursive]]])
Delete the game object

Parameters:

  • target url The game object to delete, self by default (default ".")
  • delay number Delay before delete (optional)
  • not_recursive boolean Set true to not delete children of deleted go (optional)

Returns:

    ActionInstance
actions.go.delete_objects(target_ids[, delay[, not_recursive]])
Delete the game objects

Parameters:

  • target_ids table The game objects to delete
  • delay number Delay before delete (optional)
  • not_recursive boolean Set true to not delete children of deleted go (optional)

Returns:

    ActionInstance
actions.go.enable([target="."[, delay]])
Enable the receiving component

Parameters:

  • target url The game object to delete, self by default (default ".")
  • delay number Delay before delete (optional)

Returns:

    ActionInstance
actions.go.disable([target="."[, delay]])
Disable the receiving component

Parameters:

  • target url The game object to delete, self by default (default ".")
  • delay number Delay before delete (optional)

Returns:

    ActionInstance

actions.input Functions

actions.input.get_action(action_id[, variable[, in_update_only[, trigger_event]]])
Check is action_id is active now.

Parameters:

  • action_id string The key to check
  • variable string Variable to set (optional)
  • in_update_only boolean Repeat this action every frame, skip initial call (optional)
  • trigger_event string The event to trigger on true condition (optional)

Returns:

    ActionInstance
actions.input.get_action_pressed(action_id[, variable[, in_update_only[, trigger_event]]])
Check is action_id was pressed.

Parameters:

  • action_id string The key to check
  • variable string Variable to set (optional)
  • in_update_only boolean Repeat this action every frame, skip initial call (optional)
  • trigger_event string The event to trigger on true condition (optional)

Returns:

    ActionInstance
actions.input.get_action_released(action_id[, variable[, in_update_only[, trigger_event]]])
Check is action_id was released.

Parameters:

  • action_id string The key to check
  • variable string Variable to set (optional)
  • in_update_only boolean Repeat this action every frame, skip initial call (optional)
  • trigger_event string The event to trigger on true condition (optional)

Returns:

    ActionInstance
actions.input.get_sprite_action(action_id, sprite_url[, variable[, in_update_only[, trigger_event]]])
Check is action_id is active now on sprite_url

Parameters:

  • action_id string The key to check
  • sprite_url url The sprite url to check input action
  • variable string Variable to set (optional)
  • in_update_only boolean Repeat this action every frame, skip initial call (optional)
  • trigger_event string The event to trigger on true condition (optional)

Returns:

    ActionInstance
actions.input.get_sprite_action_pressed(action_id, sprite_url[, variable[, in_update_only[, trigger_event]]])
Check is action_id is active now on sprite_url

Parameters:

  • action_id string The key to check
  • sprite_url url The sprite url to check input action
  • variable string Variable to set (optional)
  • in_update_only boolean Repeat this action every frame, skip initial call (optional)
  • trigger_event string The event to trigger on true condition (optional)

Returns:

    ActionInstance
actions.input.get_sprite_action_released(action_id, sprite_url[, variable[, in_update_only[, trigger_event]]])
Check is action_id is active now on sprite_url

Parameters:

  • action_id string The key to check
  • sprite_url url The sprite url to check input action
  • variable string Variable to set (optional)
  • in_update_only boolean Repeat this action every frame, skip initial call (optional)
  • trigger_event string The event to trigger on true condition (optional)

Returns:

    ActionInstance
actions.input.get_axis_actions(negative_action, positive_action, variable[, is_every_frame[, multiplier=1]])
Imitate two keys as axis. Set result in variable. If both keys are pressed, result will be 0

Parameters:

  • negative_action string The action_id to negative check
  • positive_action string The action_id to positive check
  • variable string Variable to set
  • is_every_frame boolean Repeat this action every frame, skip initial call (optional)
  • multiplier number The value to multiply result (default 1)

Returns:

    ActionInstance

actions.logic Functions

actions.logic.all_true(variables_array[, trigger_event[, is_every_frame]])
Sends an event if all the variables are true

Parameters:

  • variables_array variables[] Array of variables. Can be FSM or usual variable
  • trigger_event string The event to send if all variables are true (optional)
  • is_every_frame boolean Repeat this action every frame (optional)

Returns:

    ActionInstance
actions.logic.any_true(variables_array[, trigger_event[, is_every_frame]])
Sends an event if any of the variables are true

Parameters:

  • variables_array variables[] Array of variables. Can be FSM or usual variable
  • trigger_event string The event to send if any of variables are true (optional)
  • is_every_frame boolean Repeat this action every frame (optional)

Returns:

    ActionInstance
actions.logic.all_false(variables_array[, trigger_event[, is_every_frame]])
Sends an event if all the variables are false

Parameters:

  • variables_array variables[] Array of variables. Can be FSM or usual variable
  • trigger_event string The event to send if all variables are false (optional)
  • is_every_frame boolean Repeat this action every frame (optional)

Returns:

    ActionInstance
actions.logic.changed(variable[, trigger_event[, store_result]])
Tests if the value of a variable has changed. Use this to send an event on change variable.

Parameters:

  • variable variable The variable to test on changed
  • trigger_event string The event to send on variable change (optional)
  • store_result string Save true to this variable, if variable has changed (optional)

Returns:

    ActionInstance
actions.logic.test(variable[, event_on_true[, event_on_false[, store_result[, is_every_frame]]]])
Send events based on the value of a variable.

Parameters:

  • variable variable The variable to test
  • event_on_true string The event to send if variable is true (optional)
  • event_on_false string The event to send if variable is false (optional)
  • store_result string Save true to this variable, if variable has changed (optional)
  • is_every_frame boolean Repeat this action every frame (optional)

Returns:

    ActionInstance
actions.logic.compare(variable_a, variable_b[, event_equal[, event_less[, event_greater[, is_every_frame[, tolerance=0]]]]])
Send events based on the variables comparsion (numbers)

Parameters:

  • variable_a variable The first variable to compare
  • variable_b variable The second variable to compare
  • event_equal string The event to send if variable_a equals to variable_b (within tolerance) (optional)
  • event_less string The event to send if variable_a less than variable_b (optional)
  • event_greater string The event to send if variable_a greater than variable_b (optional)
  • is_every_frame boolean Repeat this action every frame (optional)
  • tolerance number The tolerance for comparsion (default 0)

Returns:

    ActionInstance
actions.logic.equals(variable_a, variable_b[, event_equal[, event_not_equal[, is_every_frame]]])
Check equals on two variables

Parameters:

  • variable_a variable The first variable to compare
  • variable_b variable The second variable to compare
  • event_equal string The event to send if variable_a equals to variable_b (optional)
  • event_not_equal string The event to send if variable_a not equals variable_b (optional)
  • is_every_frame boolean Repeat this action every frame (optional)

Returns:

    ActionInstance

actions.math Functions

actions.math.set(source, value[, is_every_frame[, is_every_second]])
Set a value to a variable

Parameters:

  • source string Variable to set
  • value variable The value to set
  • is_every_frame boolean Repeat this action every frame (optional)
  • is_every_second boolean Repeat this action every second (optional)

Returns:

    ActionInstance
actions.math.add(source, value[, is_every_frame[, is_every_second]])
Adds a value to a variable

Parameters:

  • source string Variable to add
  • value variable The value to add
  • is_every_frame boolean Repeat this action every frame (optional)
  • is_every_second boolean Repeat this action every second (optional)

Returns:

    ActionInstance
actions.math.subtract(source, value[, is_every_frame[, is_every_second]])
Subtracts a value from a variable

Parameters:

  • source string Variable to subtract from
  • value variable The value to subtract
  • is_every_frame boolean Repeat this action every frame (optional)
  • is_every_second boolean Repeat this action every second (optional)

Returns:

    ActionInstance
actions.math.multiply(source, value[, is_every_frame])
Multiplies a variable by another value

Parameters:

  • source string Variable to multiply
  • value variable The multiplier
  • is_every_frame boolean Repeat this action every frame (optional)

Returns:

    ActionInstance
actions.math.divide(source, value[, is_every_frame])
Divides a value by another value

Parameters:

  • source string Variable to divide
  • value variable Divide by this value
  • is_every_frame boolean Repeat this action every frame (optional)

Returns:

    ActionInstance
actions.math.clamp(source, min, max[, is_every_frame[, is_every_second]])
Clamps the value of a variable to a min/max range.

Parameters:

  • source string Variable to clamp
  • min variable The minimum value allowed.
  • max variable The maximum value allowed.
  • is_every_frame boolean Repeat this action every frame (optional)
  • is_every_second boolean Repeat this action every second (optional)

Returns:

    ActionInstance
actions.math.loop(source, min, max[, is_every_frame[, is_every_second]])
Loop value in range. For example If value less of min value it turns to max

Parameters:

  • source string Variable to loop
  • min number The minimum value to loop.
  • max number The maximum value to loop.
  • is_every_frame boolean Repeat this action every frame (optional)
  • is_every_second boolean Repeat this action every second (optional)

Returns:

    ActionInstance
actions.math.min(source, min[, is_every_frame[, is_every_second]])
Choose min value

Parameters:

  • source string Variable to compare
  • min variable or number Another variable
  • is_every_frame boolean Repeat this action every frame (optional)
  • is_every_second boolean Repeat this action every second (optional)

Returns:

    ActionInstance
actions.math.max(source, min[, is_every_frame[, is_every_second]])
Choose max value

Parameters:

  • source string Variable to compare
  • min variable or number Another variable
  • is_every_frame boolean Repeat this action every frame (optional)
  • is_every_second boolean Repeat this action every second (optional)

Returns:

    ActionInstance
actions.math.abs(source[, is_every_frame])
Sets a float variable to its absolute value.

Parameters:

  • source string Variable to abs
  • is_every_frame boolean Repeat this action every frame (optional)

Returns:

    ActionInstance
actions.math.random(source, min, max[, is_every_frame[, is_every_second]])
Sets a variable to a random value between min/max.

Parameters:

  • source string Variable to set
  • min variable Minimum value of the random number
  • max variable Maximum value of the random number.
  • is_every_frame boolean Repeat this action every frame (optional)
  • is_every_second boolean Repeat this action every second (optional)

Returns:

    ActionInstance
actions.math.random_boolean(source[, is_every_frame[, is_every_second]])
Sets a variable to a random value true or false

Parameters:

  • source string Variable to set
  • is_every_frame boolean Repeat this action every frame (optional)
  • is_every_second boolean Repeat this action every second (optional)

Returns:

    ActionInstance
actions.math.cos(value, store_variable[, is_degrees[, is_every_frame]])
Get a cos value

Parameters:

  • value variable Variable to take cos
  • store_variable variable Variable to set
  • is_degrees boolean Check true, if using degrees instead of radians (optional)
  • is_every_frame boolean Repeat this action every frame (optional)

Returns:

    ActionInstance
actions.math.sin(value, store_variable[, is_degrees[, is_every_frame]])
Get a sin value

Parameters:

  • value variable Variable to take sin
  • store_variable variable Variable to set
  • is_degrees boolean Check true, if using degrees instead of radians (optional)
  • is_every_frame boolean Repeat this action every frame (optional)

Returns:

    ActionInstance
actions.math.asin(value, store_variable[, is_degrees[, is_every_frame]])
Get a asin value

Parameters:

  • value variable Variable to take asin
  • store_variable variable Variable to set
  • is_degrees boolean Check true, if using degrees instead of radians (optional)
  • is_every_frame boolean Repeat this action every frame (optional)

Returns:

    ActionInstance
actions.math.acos(value, store_variable[, is_degrees[, is_every_frame]])
Get a acos value

Parameters:

  • value variable Variable to take acos
  • store_variable variable Variable to set
  • is_degrees boolean Check true, if using degrees instead of radians (optional)
  • is_every_frame boolean Repeat this action every frame (optional)

Returns:

    ActionInstance
actions.math.tan(value, store_variable[, is_degrees[, is_every_frame]])
Get a tan value

Parameters:

  • value variable Variable to take tan
  • store_variable variable Variable to set
  • is_degrees boolean Check true, if using degrees instead of radians (optional)
  • is_every_frame boolean Repeat this action every frame (optional)

Returns:

    ActionInstance
actions.math.atan(value, store_variable[, is_degrees[, is_every_frame]])
Get a atan value

Parameters:

  • value variable Variable to take atan
  • store_variable variable Variable to set
  • is_degrees boolean Check true, if using degrees instead of radians (optional)
  • is_every_frame boolean Repeat this action every frame (optional)

Returns:

    ActionInstance
actions.math.atan2(value, store_variable[, is_degrees[, is_every_frame]])
Get a atan2 value

Parameters:

  • value variable Variable to take atan2
  • store_variable variable Variable to set
  • is_degrees boolean Check true, if using degrees instead of radians (optional)
  • is_every_frame boolean Repeat this action every frame (optional)

Returns:

    ActionInstance
actions.math.operator(source_variable_a, variable_b, operator[, is_every_frame])
Apply a math function (a, b, adam_instance)=>c to source variable. Useful if you want do something, what is not designed in Adam.

Parameters:

  • source_variable_a variable First variable A
  • variable_b variable Second variable B
  • operator function The callback function
  • is_every_frame boolean Repeat this action every frame (optional)

Returns:

    ActionInstance

actions.msg Functions

actions.msg.post(target, message_id[, message[, delay]])
Post message via msg.post

Parameters:

  • target url The receiver url
  • message_id string The message id to send
  • message table A lua table with message parameters to send (optional)
  • delay number Time in seconds (optional)

Returns:

    ActionInstance

actions.physics Functions

get_trigger_info(string, string, string)
Get info about last trigger event

Parameters:

  • string own_group Variable to save own_group info
  • string own_group Variable to save own_group info
  • string own_group Variable to save own_group info

Returns:

    ActionInstance

actions.sprite Functions

actions.sprite.play_flipbook(image[, The[, finish_event[, delay[, The]]]])
Play the flipbook for target url. Finish event play on play_flipbook finish callback. The actions take minimum 1 frame.

Parameters:

  • image string The image to play
  • The target_component name sprite component, by default - all sprite components in object (optional)
  • finish_event string Name of trigger event (optional)
  • delay number The Time delay in seconds (optional)
  • The target_component name sprite component, by default - all sprite components in object (optional)

Returns:

    ActionInstance
actions.sprite.set_tint(tint[, is_every_frame[, delay[, The="sprite"}[, target_url]]]])
Set the tint to the sprite component

Parameters:

  • tint vector4 The tint vector
  • is_every_frame boolean Repeat this action every frame (optional)
  • delay number Delay before translate in seconds (optional)
  • The target_component name sprite component (default "sprite"})
  • target_url url The object to apply sprite (optional)

Returns:

    ActionInstance
actions.sprite.add_tint(tint[, is_every_frame[, delay[, The="sprite"}[, target_url]]]])
Add the tint to the sprite component

Parameters:

  • tint vector4 The tint vector
  • is_every_frame boolean Repeat this action every frame (optional)
  • delay number Delay before translate in seconds (optional)
  • The target_component name sprite component (default "sprite"})
  • target_url url The object to apply sprite (optional)

Returns:

    ActionInstance
actions.sprite.animate_tint(tint, time[, finish_event[, delay[, ease_function[, The="sprite"}[, target_url]]]]])
Animate the tint to the sprite component

Parameters:

  • tint vector4 The tint vector
  • time number The time to animate
  • finish_event string Name of trigger event (optional)
  • delay number Delay before animate in seconds (optional)
  • ease_function ease The ease function to animate. Default in settings.get_default_easing (optional)
  • The target_component name sprite component (default "sprite"})
  • target_url url The object to apply sprite (optional)

Returns:

    ActionInstance
actions.sprite.animate_tint_by(tint, time[, finish_event[, delay[, ease_function[, The="sprite"}[, target_url]]]]])
Animate the tint of the sprite component with relative tint vector

Parameters:

  • tint vector4 The tint vector
  • time number The time to animate
  • finish_event string Name of trigger event (optional)
  • delay number Delay before animate in seconds (optional)
  • ease_function ease The ease function to animate. Default in settings.get_default_easing (optional)
  • The target_component name sprite component (default "sprite"})
  • target_url url The object to apply sprite (optional)

Returns:

    ActionInstance
actions.sprite.get_tint(variable[, is_every_frame[, The="sprite"}[, target_url]]])
Get the tint property of a game object and store to variable

Parameters:

  • variable string The variable to store result
  • is_every_frame boolean Repeat this action every frame (optional)
  • The target_component name sprite component (default "sprite"})
  • target_url url The object to apply sprite (optional)

Returns:

    ActionInstance
actions.sprite.set_alpha(alpha[, is_every_frame[, delay[, The="sprite"}[, target_url]]]])
Set the alpha to the sprite component

Parameters:

  • alpha number The sprite alpha value
  • is_every_frame boolean Repeat this action every frame (optional)
  • delay number Delay before translate in seconds (optional)
  • The target_component name sprite component (default "sprite"})
  • target_url url The object to apply sprite (optional)

Returns:

    ActionInstance
actions.sprite.add_alpha(alpha[, is_every_frame[, delay[, The="sprite"}[, target_url]]]])
Add the alpha to the sprite component

Parameters:

  • alpha number The sprite alpha value
  • is_every_frame boolean Repeat this action every frame (optional)
  • delay number Delay before translate in seconds (optional)
  • The target_component name sprite component (default "sprite"})
  • target_url url The object to apply sprite (optional)

Returns:

    ActionInstance
actions.sprite.animate_alpha(alpha, time[, finish_event[, delay[, ease_function[, The="sprite"}[, target_url]]]]])
Animate the alpha to the sprite component

Parameters:

  • alpha number The sprite alpha value
  • time number The time to animate
  • finish_event string Name of trigger event (optional)
  • delay number Delay before animate in seconds (optional)
  • ease_function ease The ease function to animate. Default in settings.get_default_easing (optional)
  • The target_component name sprite component (default "sprite"})
  • target_url url The object to apply sprite (optional)

Returns:

    ActionInstance
actions.sprite.animate_alpha_by(alpha, time[, finish_event[, delay[, ease_function[, The="sprite"}[, target_url]]]]])
Animate the alpha of the sprite component with relative alpha vector

Parameters:

  • alpha number The sprite alpha value
  • time number The time to animate
  • finish_event string Name of trigger event (optional)
  • delay number Delay before animate in seconds (optional)
  • ease_function ease The ease function to animate. Default in settings.get_default_easing (optional)
  • The target_component name sprite component (default "sprite"})
  • target_url url The object to apply sprite (optional)

Returns:

    ActionInstance
actions.sprite.get_alpha(variable[, is_every_frame[, The="sprite"}[, target_url]]])
Get the alpha property of a game object and store to variable

Parameters:

  • variable string The variable to store result
  • is_every_frame boolean Repeat this action every frame (optional)
  • The target_component name sprite component (default "sprite"})
  • target_url url The object to apply sprite (optional)

Returns:

    ActionInstance
actions.sprite.set_vflip(is_flip[, The[, is_every_frame[, delay[, The]]]])
Set vertical flip for the sprite

Parameters:

  • is_flip boolean The boolean flag for flip
  • The target_component name sprite component, by default - all sprite components in object (optional)
  • is_every_frame boolean Repeat this action every frame (optional)
  • delay number The Time delay in seconds (optional)
  • The target_component name sprite component, by default - all sprite components in object (optional)

Returns:

    ActionInstance
actions.sprite.set_hflip(is_flip[, The[, is_every_frame[, delay[, The]]]])
Set horizontal flip for the sprite

Parameters:

  • is_flip boolean The boolean flag for flip
  • The target_component name sprite component, by default - all sprite components in object (optional)
  • is_every_frame boolean Repeat this action every frame (optional)
  • delay number The Time delay in seconds (optional)
  • The target_component name sprite component, by default - all sprite components in object (optional)

Returns:

    ActionInstance

actions.template Functions

func(source, value, is_every_frame)
Add operator

Parameters:

  • source
  • value
  • is_every_frame

Returns:

    ActionInstance

actions.time Functions

actions.time.delay(seconds[, trigger_event])
Trigger event after time elapsed. Trigger event is optional

Parameters:

  • seconds number or variable Amount of seconds for delay
  • trigger_event string Name of trigger event (optional)

Returns:

    ActionInstance
actions.time.random_delay(min_seconds, max_seconds[, trigger_event])
Trigger event after random time elapsed. Trigger event is optional

Parameters:

  • min_seconds number or variable Minimum amount of seconds for delay
  • max_seconds number or variable Maximum amount of seconds for delay
  • trigger_event string Name of trigger event (optional)

Returns:

    ActionInstance
actions.time.frames(frames[, trigger_event])
Trigger event after amount of frames. Trigger event is optional

Parameters:

  • frames number Amount of frames to wait
  • trigger_event string Name of trigger event (optional)

Returns:

    ActionInstance

actions.transform Functions

actions.transform.set_position(target_vector[, is_every_frame[, delay[, target_url]]])
Sets the position of a game object

Parameters:

  • target_vector vector3 Position vector
  • is_every_frame boolean Repeat this action every frame (optional)
  • delay number Delay before translate in seconds (optional)
  • target_url url The object to apply transform (optional)

Returns:

    ActionInstance
actions.transform.add_position(delta_vector[, is_every_frame[, delay[, target_url]]])
Add the position to a game object

Parameters:

  • delta_vector vector3 Vector with x/y/z params to translate
  • is_every_frame boolean Repeat this action every frame (optional)
  • delay number Delay before translate in seconds (optional)
  • target_url url The object to apply transform (optional)

Returns:

    ActionInstance
actions.transform.animate_position(target_vector, time[, finish_event[, delay[, ease_function[, target_url]]]])
Animate the position of a game object

Parameters:

  • target_vector vector3 Position vector
  • time number The time to animate
  • finish_event string Name of trigger event (optional)
  • delay number Delay before animate in seconds (optional)
  • ease_function ease The ease function to animate. Default in settings.get_default_easing (optional)
  • target_url url The object to apply transform (optional)

Returns:

    ActionInstance
actions.transform.animate_position_by(target_vector, time[, finish_event[, delay[, ease_function[, target_url]]]])
Animate the position of a game object by a delta vector

Parameters:

  • target_vector vector3 Delta position vector
  • time number The time to animate
  • finish_event string Name of trigger event (optional)
  • delay number Delay before animate in seconds (optional)
  • ease_function ease The ease function to animate. Default in settings.get_default_easing (optional)
  • target_url url The object to apply transform (optional)

Returns:

    ActionInstance
actions.transform.get_position(variable[, is_every_frame[, target_url]])
Get the position property of a game object and store to variable

Parameters:

  • variable string The variable to store result
  • is_every_frame boolean Repeat this action every frame (optional)
  • target_url url The object to apply transform (optional)

Returns:

    ActionInstance
actions.transform.set_rotation(target_quaternion[, is_every_frame[, delay[, target_url]]])
Sets the rotation of a game object

Parameters:

  • target_quaternion quaternion Rotation quatenion
  • is_every_frame boolean Repeat this action every frame (optional)
  • delay number Delay before translate in seconds (optional)
  • target_url url The object to apply transform (optional)

Returns:

    ActionInstance
actions.transform.add_rotation(target_quaternion[, is_every_frame[, delay[, target_url]]])
Add the rotation of a game object

Parameters:

  • target_quaternion quaternion Rotation quatenion
  • is_every_frame boolean Repeat this action every frame (optional)
  • delay number Delay before translate in seconds (optional)
  • target_url url The object to apply transform (optional)

Returns:

    ActionInstance
actions.transform.animate_rotation(target_quaternion, time[, finish_event[, delay[, ease_function[, target_url]]]])
Animate the rotation of a game object

Parameters:

  • target_quaternion quaternion Rotation quaternion
  • time number The time to animate
  • finish_event string Name of trigger event (optional)
  • delay number Delay before animate in seconds (optional)
  • ease_function ease The ease function to animate. Default in settings.get_default_easing (optional)
  • target_url url The object to apply transform (optional)

Returns:

    ActionInstance
actions.transform.animate_rotation_by(target_quaternion, time[, finish_event[, delay[, ease_function[, target_url]]]])
Animate the rotation of a game object with a delta quaternion

Parameters:

  • target_quaternion quaternion Delta rotation quaternion
  • time number The time to animate
  • finish_event string Name of trigger event (optional)
  • delay number Delay before animate in seconds (optional)
  • ease_function ease The ease function to animate. Default in settings.get_default_easing (optional)
  • target_url url The object to apply transform (optional)

Returns:

    ActionInstance
actions.transform.get_rotation(variable[, is_every_frame[, target_url]])
Get the rotation property of a game object and store to variable

Parameters:

  • variable string The variable to store result
  • is_every_frame boolean Repeat this action every frame (optional)
  • target_url url The object to apply transform (optional)

Returns:

    ActionInstance
actions.transform.set_euler(target_euler[, is_every_frame[, delay[, target_url]]])
Sets the euler of a game object

Parameters:

  • target_euler vector3 The euler vector
  • is_every_frame boolean Repeat this action every frame (optional)
  • delay number Delay before translate in seconds (optional)
  • target_url url The object to apply transform (optional)

Returns:

    ActionInstance
actions.transform.add_euler(target_euler[, is_every_frame[, delay[, target_url]]])
Add the euler of a game object

Parameters:

  • target_euler vector3 The euler vector
  • is_every_frame boolean Repeat this action every frame (optional)
  • delay number Delay before translate in seconds (optional)
  • target_url url The object to apply transform (optional)

Returns:

    ActionInstance
actions.transform.animate_euler(target_euler, time[, finish_event[, delay[, ease_function[, target_url]]]])
Animate the euler of a game object with euler vector

Parameters:

  • target_euler vector3 The euler vector
  • time number The time to animate
  • finish_event string Name of trigger event (optional)
  • delay number Delay before animate in seconds (optional)
  • ease_function ease The ease function to animate. Default in settings.get_default_easing (optional)
  • target_url url The object to apply transform (optional)

Returns:

    ActionInstance
actions.transform.animate_euler_by(target_euler, time[, finish_event[, delay[, ease_function[, target_url]]]])
Animate the euler of a game object with relative euler vector

Parameters:

  • target_euler vector3 Rotation quaternion
  • time number The time to animate
  • finish_event string Name of trigger event (optional)
  • delay number Delay before animate in seconds (optional)
  • ease_function ease The ease function to animate. Default in settings.get_default_easing (optional)
  • target_url url The object to apply transform (optional)

Returns:

    ActionInstance
actions.transform.get_euler(variable[, is_every_frame[, target_url]])
Get the euler property of a game object and store to variable

Parameters:

  • variable string The variable to store result
  • is_every_frame boolean Repeat this action every frame (optional)
  • target_url url The object to apply transform (optional)

Returns:

    ActionInstance
actions.transform.set_random_euler([keep_x[, keep_y[, keep_z[, is_every_frame[, delay[, target_url]]]]]])
Sets the random euler of a game object

Parameters:

  • keep_x boolean Set true to keep x euler angle (optional)
  • keep_y boolean Set true to keep x euler angle (optional)
  • keep_z boolean Set true to keep x euler angle (optional)
  • is_every_frame boolean Repeat this action every frame (optional)
  • delay number Delay before translate in seconds (optional)
  • target_url url The object to apply transform (optional)

Returns:

    ActionInstance
actions.transform.set_scale(target_scale[, is_every_frame[, delay[, target_url]]])
Set scale to a game object

Parameters:

  • target_scale vector3 Scale vector
  • is_every_frame boolean Repeat this action every frame (optional)
  • delay number Delay before translate in seconds (optional)
  • target_url url The object to apply transform (optional)

Returns:

    ActionInstance
actions.transform.add_scale(target_scale[, is_every_frame[, delay[, target_url]]])
Add scale to a game object

Parameters:

  • target_scale vector3 Scale vector
  • is_every_frame boolean Repeat this action every frame (optional)
  • delay number Delay before translate in seconds (optional)
  • target_url url The object to apply transform (optional)

Returns:

    ActionInstance
actions.transform.animate_scale(target_scale, time[, finish_event[, delay[, ease_function[, target_url]]]])
Animate scale to a game object

Parameters:

  • target_scale vector3 Scale vector
  • time number The time to animate
  • finish_event string Name of trigger event (optional)
  • delay number Delay before animate in seconds (optional)
  • ease_function ease The ease function to animate. Default in settings.get_default_easing (optional)
  • target_url url The object to apply transform (optional)

Returns:

    ActionInstance
actions.transform.animate_scale_by(target_scale, time[, finish_event[, delay[, ease_function[, target_url]]]])
Animate scale to a game object with relative vector

Parameters:

  • target_scale vector3 Add scale vector
  • time number The time to animate
  • finish_event string Name of trigger event (optional)
  • delay number Delay before animate in seconds (optional)
  • ease_function ease The ease function to animate. Default in settings.get_default_easing (optional)
  • target_url url The object to apply transform (optional)

Returns:

    ActionInstance
actions.transform.get_scale(variable[, is_every_frame[, target_url]])
Get the scale property of a game object and store to variable

Parameters:

  • variable string The variable to store result
  • is_every_frame boolean Repeat this action every frame (optional)
  • target_url url The object to apply transform (optional)

Returns:

    ActionInstance

actions.vmath Functions

actions.vmath.set_xyz(source[, value_x[, value_y[, value_z[, is_every_frame]]]])
Sets the XYZ channels of a Vector3 variable

Parameters:

  • source string Variable to set
  • value_x number The x value to set. Pass nil to not change value (optional)
  • value_y number The y value to set. Pass nil to not change value (optional)
  • value_z number The z value to set. Pass nil to not change value (optional)
  • is_every_frame boolean Repeat this action every frame (optional)

Returns:

    ActionInstance
actions.vmath.add_xyz(source[, value_x[, value_y[, value_z[, is_every_frame]]]])
Add the XYZ channels of a Vector3 variable

Parameters:

  • source string Variable to add
  • value_x number The x value to add. Pass nil to not change value (optional)
  • value_y number The y value to add. Pass nil to not change value (optional)
  • value_z number The z value to add. Pass nil to not change value (optional)
  • is_every_frame boolean Repeat this action every frame (optional)

Returns:

    ActionInstance
actions.vmath.add(source, variable[, is_every_frame])
Adds a Vector3 value to a Vector3 variable

Parameters:

  • source string Variable to add
  • variable variable Vector3 to add
  • is_every_frame boolean Repeat this action every frame (optional)

Returns:

    ActionInstance
actions.vmath.get_xyz(source[, value_x[, value_y[, value_z[, is_every_frame]]]])
Get the XYZ channels of a Vector3 variable

Parameters:

  • source string Variable to get
  • value_x string The variable to store x value. Pass nil to not store (optional)
  • value_y string The variable to store y value. Pass nil to not store (optional)
  • value_z string The variable to store z value. Pass nil to not store (optional)
  • is_every_frame boolean Repeat this action every frame (optional)

Returns:

    ActionInstance
actions.vmath.length(variable, store[, is_every_frame])
Get the length of vector to the store value

Parameters:

  • variable variable The vector3 to get length
  • store string The variable to store euler result. Pass nil to not store
  • is_every_frame boolean Repeat this action every frame (optional)

Returns:

    ActionInstance
actions.vmath.multiply(source, value[, is_every_frame])
Multiply a vector by a varialbe

Parameters:

  • source string Variable vector to multiply
  • value variable The multiplier variable
  • is_every_frame boolean Repeat this action every frame (optional)

Returns:

    ActionInstance
actions.vmath.get_euler(from, from, store[, is_every_frame])
Get euler value between two points

Parameters:

  • from variable Vector3 to check to
  • from variable Vector3 to check to
  • store string The variable to store euler result. Pass nil to not store
  • is_every_frame boolean Repeat this action every frame (optional)

Returns:

    ActionInstance
actions.vmath.subtract(source, value[, is_every_frame])
Subtracts a one vector3 from another

Parameters:

  • source string Variable vector to subtract from
  • value variable The vector to subtract
  • is_every_frame boolean Repeat this action every frame (optional)

Returns:

    ActionInstance
actions.vmath.subtract(source[, is_every_frame])
Normalize a vector variable. His length will be 1. Of length of vector - 0 it will be not changed

Parameters:

  • source string Variable vector to normalize
  • is_every_frame boolean Repeat this action every frame (optional)

Returns:

    ActionInstance
generated by LDoc TESTING Last updated 2015-01-01 12:00:00