# 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 @@
This function is called before the game loads its resources. One can modify various game variables here:* Seed = 0 - sets the seed of the random number generator - * !GameFlags = gfSolidLand + gfArtillery + ... - sets the gameflags, see above for the available flags + * !EnableGameFlags(gfSolidLand, gfArtillery) - sets the GameFlags (just 2 of them in this example), see above for the available flags * !TurnTime = 60000 - set the turntime in ms * !CaseFreq = 0 - frequency of crate drops * !HealthCaseProb = 35 - chance of receiving a health crate @@ -135,7 +135,7 @@ end === onGearResurrect(gearUid) === -
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. +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.=== onAmmoStoreInit() === @@ -605,6 +605,26 @@ == Other Functions == +=== !ClearGameFlags() === + +Disables *all* GameFlags ++ +=== !DisableGameFlags(gameflag, ...) === + +Disables the listed GameFlags, without changing the status of other GameFlags ++ +=== !EnableGameFlags(gameflag, ...) === + +Enables the listed GameFlags, without changing the status of other GameFlags ++ +=== !GetGameFlag(gameflag) === + +Returns true if the specified gameflag is enabled, otherwise false ++ === !EndGame() ===Makes the game end.