layer_sequence_get_x

With this function you supply the sequence element ID - as returned by layer_sequence_create() or by one of the layer element functions - and it will return the current X position in the game room for the sequence.

 

Syntax:

layer_sequence_get_x(sequence_element_id)

ArgumentTypeDescription
sequence_element_idSequence Element IDThe unique ID value of the sequence element to target

 

Returns:

Real

 

Example:

if (layer_sequence_get_x(title_sequence) != room_width / 2)
{
    layer_sequence_x(title_sequence, room_width / 2);
}

The above code checks the X position of the sequence element ID stored in the variable "title_sequence", and if it's not set to half the room width, it is set to this value.