timeline_exists

Checks if a given time line exists.

Syntax:

timeline_exists(ind);


Argument Description
ind The index of the time line to check for.


Returns: Boolean


Description

With this function you can check and see whether a time line exists (returns true) or not (returns false). This is particularly useful when creating Timelines dynamically using the timeline_add function, but you should note that if you search for an uninitialised variable (that would otherwise be assigned to a time line's index) an error will be thrown.


Example:

if timeline_exists(global.tl) timeline_delete(global.tl);

The above code checks to see if a time line exists and is indexed in the global variable "tl" and if so it then deletes that time line.


Back: Timelines
Next: timeline_get_name
© Copyright YoYo Games Ltd. 2018 All Rights Reserved