Difference between revisions of "Lua:IncludeScript"
From Fortress Forever Wiki
Jump to navigationJump to search (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 ...) |
m |
||
| Line 1: | Line 1: | ||
| + | {{Infobox manual/Header}} | ||
| + | {{Infobox mapping}} | ||
==IncludeScript(string)== | ==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. | 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. | ||
| Line 9: | Line 11: | ||
[[Category:Lua_Commands]] | [[Category:Lua_Commands]] | ||
[[Category:Utility_functions]] | [[Category:Utility_functions]] | ||
| + | {{Infobox manula/Footer}} | ||
Revision as of 13:28, 5 May 2010
|
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. ExampleIncludeScript("base_id");
IncludeScript("base_respawnturret");
IncludeScript("base_location");
|