# HG changeset patch
# User Wuzzy
# Date 1555509567 -3600
# Node ID e8c8ffe6e22b83ef753552731b6d30cac3be73ae
# Parent 8b10d405a1a035f30208a92c0440c72a75b1c084
LuaGameplay: for links to LuaEvents
diff -r 8b10d405a1a0 -r e8c8ffe6e22b LuaGameplay.wiki
--- a/LuaGameplay.wiki Wed Apr 17 14:54:22 2019 +0100
+++ b/LuaGameplay.wiki Wed Apr 17 14:59:27 2019 +0100
@@ -113,7 +113,7 @@
== Ammo ==
=== !SetAmmo(ammoType, count, probability, delay, numberInCrate) ===
-This updates the settings (initial ammo, crate probability, etc.) for a specified [AmmoTypes ammo type]. This must only be used in the `onAmmoStoreInit()` event handler. In other places, this function will not work.
+This updates the settings (initial ammo, crate probability, etc.) for a specified [AmmoTypes ammo type]. This must only be used in the `onAmmoStoreInit()` [LuaEvents event handler]. In other places, this function will not work.
In Lua missions, for *all* ammo types, the ammo count, probability, delay and number in crates is set to 0 initially. Note: This also includes skip!
@@ -173,7 +173,7 @@
SetAmmoTexts(amBazooka, "This weapon deals double the damage than usually.")
=== !AddAmmo(gearUid, ammoType, ammoCount) ===
-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.
+Adds `ammoType` to the specified gear. The amount added is determined by the arguments passed via `SetAmmo()` in the `onAmmoStoreInit()` [LuaEvents 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`.