85
edits
Line 330: | Line 330: | ||
{<br> | {<br> | ||
<br> | <br> | ||
<br> | <br> | ||
if ( | if (save_point eq 0)<br> | ||
{ <br> | { <br> | ||
...<br> | ...<br> | ||
}<br> | }<br> | ||
<br> | <br> | ||
if ( | if (save_point eq 1)<br> | ||
{<br> | {<br> | ||
...<br> | ...<br> | ||
}<br> | }<br> | ||
<br> | <br> | ||
}</tt> | |||
Using forking, you can link save points to functions. Like so : | |||
<tt>func void main(void)<br> | |||
{<br> | |||
<br> | <br> | ||
if ( | if (save_point eq 0)<br> | ||
{<br> | { <br> | ||
fork logic<br> | |||
}<br> | }<br> | ||
<br> | <br> | ||
if ( | if (save_point eq 1)<br> | ||
{<br> | {<br> | ||
fork logic2<br> | |||
}<br> | }<br> | ||
<br> | <br> | ||
}</tt> | }</tt> | ||
When save point 0 is loaded (TCTF Training), the function "logic" is executed. If save point 1 is loaded (Syndicate Warehouse), "logic2" is executed. Note that in Warehouse, the save point number in the script is one higher than in the level load list, because "TCTF Training" is SP0. | |||
edits