Skip to content

run_script_by_number

Prototypevoid run_script_by_number(int script_number, string procedure[19])

run_script_by_number() will look for the script defined by script_number and attempt to run the specified procedure.

c
// modified extract of dam-fire.c
int &junk = is_script_attached(&missile_target);
if (&junk > 0)
{
    run_script_by_number(&junk, "die");
    return;
}
Dink
< 1.08

If the procedure cannot be found it will still attempt to run the script, and will run the last procedure in the script.

Dink
1.08

The script will only be run if the procedure is found.