Lua:IncludeScript

From Fortress Forever Wiki
Revision as of 19:54, 12 May 2009 by Crazycarl (talk | contribs) (New page: ==IncludeScript(string)== This function loads the contents of another lua file. The result is as if you had copy-pasted the entire file into your own script. The included file must reside ...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

IncludeScript(string)

This function loads the contents of another lua file. The result is as if you had copy-pasted the entire file into your own script. The included file must reside in FortresForever\maps\includes. Includes are generally done at the beginning of the lua, because any code below the include will take precendence over the included code. However, it's possible to run IncludeScript at any time, even changing the rules of your map on the fly.

Example

IncludeScript("base_id");
IncludeScript("base_respawnturret");
IncludeScript("base_location");