# HG changeset patch # User sheepyluva@gmail.com # Date 1390316280 0 # Node ID b9bd613524ca4cea944953845dd629b29556178b # Parent 3552b458f1eaa00cec4d72c92055af42af1b446b adding gameflag api documentation diff -r 3552b458f1ea -r b9bd613524ca LuaAPI.wiki --- a/LuaAPI.wiki Tue Jan 21 13:29:31 2014 +0000 +++ b/LuaAPI.wiki Tue Jan 21 14:58:00 2014 +0000 @@ -67,7 +67,7 @@ <blockquote>This function is called before the game loads its resources. One can modify various game variables here: </blockquote> * <tt>Seed = 0</tt> - sets the seed of the random number generator - * <tt>!GameFlags = gfSolidLand + gfArtillery + ...</tt> - sets the gameflags, see above for the available flags + * <tt>!EnableGameFlags(gfSolidLand, gfArtillery)</tt> - sets the GameFlags (just 2 of them in this example), see above for the available flags * <tt>!TurnTime = 60000</tt> - set the turntime in ms * <tt>!CaseFreq = 0</tt> - frequency of crate drops * <tt>!HealthCaseProb = 35</tt> - chance of receiving a health crate @@ -135,7 +135,7 @@ end</code> === <tt>onGearResurrect(gearUid) </tt> === -<blockquote>This function is called when a gear is resurrected. CPU Hogs will resurrect if gfAISurvival is included in !GameFlags. Alternatively, specific gears can have heResurrectable set to true via !SetEffect. +<blockquote>This function is called when a gear is resurrected. CPU Hogs will resurrect if the !GameFlag gfAISurvival is enabled. Alternatively, specific gears can have heResurrectable set to true via !SetEffect. </blockquote> === <tt>onAmmoStoreInit()</tt> === @@ -605,6 +605,26 @@ == Other Functions == +=== <tt>!ClearGameFlags()</tt> === + +<blockquote>Disables *all* GameFlags +</blockquote> + +=== <tt>!DisableGameFlags(gameflag, ...)</tt> === + +<blockquote>Disables the listed GameFlags, without changing the status of other GameFlags +</blockquote> + +=== <tt>!EnableGameFlags(gameflag, ...)</tt> === + +<blockquote>Enables the listed GameFlags, without changing the status of other GameFlags +</blockquote> + +=== <tt>!GetGameFlag(gameflag)</tt> === + +<blockquote>Returns true if the specified gameflag is enabled, otherwise false +</blockquote> + === <tt>!EndGame()</tt> === <blockquote>Makes the game end.