LuaAPI.wiki
changeset 1410 6d356877f1d2
parent 1409 755e96dd1ff1
child 1411 7c5c8c620a9f
equal deleted inserted replaced
1409:755e96dd1ff1 1410:6d356877f1d2
   528 Returns the name of the voicepack of the team of the specified hedgehog gear.
   528 Returns the name of the voicepack of the team of the specified hedgehog gear.
   529 
   529 
   530 === <tt>!GetAmmoCount(gearUid, ammoType)</tt> ===
   530 === <tt>!GetAmmoCount(gearUid, ammoType)</tt> ===
   531 Returns the ammo count of the specified ammo type for the specified hedgehog gear.
   531 Returns the ammo count of the specified ammo type for the specified hedgehog gear.
   532 
   532 
       
   533 === <tt>!GetAmmoTimer(gearUid, ammoType)</tt> (0.9.25) ===
       
   534 Returns the currently configured ammo timer (in milliseconds) for the given hedgehog gear and specified ammo type. This is the timer which is set by the player by using the timer keys (1-5). For ammo types for which the timer cannot be changed, `nil` is returned.
       
   535 
       
   536 Example:
       
   537 <code lang="lua">GetAmmoTimer(CurrentHedgehog, amGrenade)
       
   538 -- May return 1000, 2000, 3000, 4000 or 5000</code>
       
   539 
   533 === <tt>!IsHogLocal(gearUid)</tt> (0.9.23) ===
   540 === <tt>!IsHogLocal(gearUid)</tt> (0.9.23) ===
   534 Returns `true` if the specified hedgehog gear is controlled by a human player on the computer on which Hedgewars runs on (i.e. not over a computer over the network). Also returns `true` if the hog is a member of any of the local clans. Returns `false` otherwise. Returns `nil` if `gearUid` is invalid.
   541 Returns `true` if the specified hedgehog gear is controlled by a human player on the computer on which Hedgewars runs on (i.e. not over a computer over the network). Also returns `true` if the hog is a member of any of the local clans. Returns `false` otherwise. Returns `nil` if `gearUid` is invalid.
   535 
   542 
   536 This is perfect to hide certain captions like weapon messages from enemy eyes.
   543 This is perfect to hide certain captions like weapon messages from enemy eyes.
   537 
   544