This function will return true or false depending on whether the script with the given index exists. Note, that this is not a string, but rather the asset name which holds the unique index for each script (as it would appear in the IDE). For more information on scripts, see Scripts.
|scr||The name of the script that you want to check.|
script = -1;
script = scr_AI_Left;
script = scr_AI_Right;
var script_num = choose(0, 1, 2);
The above example adds two scripts and a value into an array, then proceeds to get a random number and use that to choose a script to run, unless the real is chosen in which case nothing will happen.