Create a function pointer in Game Maker Studio
<p>I would like to dynamically change the script that is executed when a index in an array is called.</p>

<p>The following is valid syntax:</p>

<pre><code>actions[0] = script_do_something
...
actions[n] = script_do_something_else
</code></pre>

<p>How do I execute the scripts stored in the array? If I cant, then how else could I replicate a function pointer in GMS?</p>

<p>Unfortunately this doesn't work:</p>

<pre><code>actions[0]()
</code></pre>

<p>I would like to avoid <code>if</code> statements as I feel they will get too long and messy.</p>