Oni (folder)/GameDataFolder/IGMD/global: Difference between revisions

m
correct link for "fork"
(noted the best use of this folder (setting up macro functions); various wording and formatting tweaks)
m (correct link for "fork")
 
Line 15: Line 15:
  }
  }


You might be tempted to use <code>[[BSL:Functions|fork]] some_global_function</code> in <tt>main()</tt>, but it's probably better to call the function inline (that is, no "fork") to make sure that it fully executes before the original level logic resumes. You can always fork specific code from inside your global function. Just be aware that any commands you insert into the level scripting will delay the execution of the original logic unless you do decide to use <tt>fork</tt>.
You might be tempted to use <code>[[BSL:Manual#fork|fork]] some_global_function</code> in <tt>main()</tt>, but it's probably better to call the function inline (that is, no "fork") to make sure that it fully executes before the original level logic resumes. You can always fork specific code from inside your global function. Just be aware that any commands you insert into the level scripting will delay the execution of the original logic unless you do decide to use <tt>fork</tt>.


==Code overriding==
==Code overriding==