LuaAPI.wiki
changeset 13 2074f03075c6
parent 12 74ead59b6c64
child 16 89f22a959bb8
equal deleted inserted replaced
12:74ead59b6c64 13:2074f03075c6
     6 </blockquote>
     6 </blockquote>
     7 Game flags:
     7 Game flags:
     8 
     8 
     9 <blockquote><tt>gfForts, gfMultiWeapon, gfSolidLand, gfDivideTeams, gfLowGravity, gfLaserSight, gfInvulnerable, gfMines, gfVampiric, gfKarma, gfArtillery, gfOneClanMode, gfRandomOrder, gfKing, gfPlaceHog, gfSharedAmmo, gfDisableGirders, gfExplosives, gfDisableLandObjects, gfAISurvival</tt>
     9 <blockquote><tt>gfForts, gfMultiWeapon, gfSolidLand, gfDivideTeams, gfLowGravity, gfLaserSight, gfInvulnerable, gfMines, gfVampiric, gfKarma, gfArtillery, gfOneClanMode, gfRandomOrder, gfKing, gfPlaceHog, gfSharedAmmo, gfDisableGirders, gfExplosives, gfDisableLandObjects, gfAISurvival</tt>
    10 </blockquote>
    10 </blockquote>
    11 More constants at [GearTypes, Gear Types] , [AmmoTypes Ammo Types], [Sounds], [States]
    11 More constants at [GearTypes Gear Types] , [AmmoTypes Ammo Types], [Sounds], [States]
    12 
    12 
    13 Additional global changing variables accessible:
    13 Additional global changing variables accessible:
    14 
    14 
    15  * <tt>!TurnTimeLeft</tt> - number of game ticks left until the current turn ends
    15  * <tt>!TurnTimeLeft</tt> - number of game ticks left until the current turn ends
    16  * <tt>!ClansCount</tt> - number of clans in the game, i.e. number of players
    16  * <tt>!ClansCount</tt> - number of clans in the game, i.e. number of players
    54 <blockquote>This function is called when a new gear is deleted. Useful in
    54 <blockquote>This function is called when a new gear is deleted. Useful in
    55 combination with <tt>!GetGearType(gearUid)</tt>.
    55 combination with <tt>!GetGearType(gearUid)</tt>.
    56 </blockquote>
    56 </blockquote>
    57 === <tt>onAmmoStoreInit()</tt> ===
    57 === <tt>onAmmoStoreInit()</tt> ===
    58 
    58 
    59 <blockquote>This function is called when the game is initialized to request the available ammo and ammo probabilities. Use SetAmmo here.
    59 <blockquote>This function is called when the game is initialized to request the available ammo and ammo probabilities. Use !SetAmmo here.
    60 </blockquote>
    60 </blockquote>
    61 == Functions for creating gears ==
    61 == Functions for creating gears ==
    62 
    62 
    63 === <tt>!AddGear(x, y, gearType, state, dx, dy, timer)</tt> ===
    63 === <tt>!AddGear(x, y, gearType, state, dx, dy, timer)</tt> ===
    64 
    64 
   208 </blockquote>
   208 </blockquote>
   209 === <tt>!SetTag(gearUid, tag)</tt> ===
   209 === <tt>!SetTag(gearUid, tag)</tt> ===
   210 
   210 
   211 === <tt>!SetTimer(gearUid, timer)</tt> (0.9.14) ===
   211 === <tt>!SetTimer(gearUid, timer)</tt> (0.9.14) ===
   212 
   212 
   213 <blockquote>Sets the timer of the specified gear. Also see GetTimer.
   213 <blockquote>Sets the timer of the specified gear. Also see !GetTimer.
   214 </blockquote>
   214 </blockquote>
   215 
   215 
   216 == Other Functions ==
   216 == Other Functions ==
   217 
   217 
   218 === <tt>!EndGame()</tt> ===
   218 === <tt>!EndGame()</tt> ===
   243 
   243 
   244 === <tt>!WriteLnToConsole(string)</tt> (0.9.14) ===
   244 === <tt>!WriteLnToConsole(string)</tt> (0.9.14) ===
   245 
   245 
   246 <blockquote>Guess :D
   246 <blockquote>Guess :D
   247 </blockquote>
   247 </blockquote>
   248