LuaAPI: AddAmmo per-team
authorWuzzy
Sun, 06 Jan 2019 21:25:16 +0000
changeset 1700 ef1f9ddfe5e2
parent 1699 4eea5f6707d9
child 1701 b131247a8f29
LuaAPI: AddAmmo per-team
LuaAPI.wiki
--- a/LuaAPI.wiki	Thu Jan 03 15:20:20 2019 +0000
+++ b/LuaAPI.wiki	Sun Jan 06 21:25:16 2019 +0000
@@ -1204,6 +1204,8 @@
 ==== <tt>!AddAmmo(gearUid, ammoType, ammoCount)</tt> ====
 Adds `ammoType` to the specified gear. The amount added is determined by the arguments passed via `SetAmmo()` in the `onAmmoStoreInit()` event handler. `ammoCount` is an optional parameter. If this is set, the ammo will **not** be added, but instead set to `ammoCount`. A value of `0` will remove the weapon, a value of `AMMO_INFINITE` will give infinite ammo.
 
+Note: By default, ammo is per-team, so calling `AddAmmo` for a hedgehog will give the ammo for the whole team. The game flags `gfPerHogAmmo` and `gfSharedAmmo` change how ammo is managed in the game, so these game flags also affect `AddAmmo`.
+
 ==== <tt>!GetAmmoName(ammoType [, ignoreOverwrite ])</tt> (0.9.23) ====
 Returns the localized name for the specified `ammoType`, taking an ammo name overwritten by `SetAmmoTexts` into account. If `ignoreOverwrite` is `true`, this function will always return the original ammo name of the weapon and ignores names which may have been overwritten by `SetAmmoTexts`.