LuaGuide.wiki
changeset 1805 d18970cf6ca2
parent 1747 8269ec3e5bfc
child 1810 886f6f056e42
--- a/LuaGuide.wiki	Wed Apr 17 16:12:45 2019 +0200
+++ b/LuaGuide.wiki	Wed Apr 17 16:16:48 2019 +0200
@@ -63,7 +63,7 @@
 
 The two most important event handlers are `onGameInit` and `onAmmoStoreInit`. They are used instead of loading a game scheme and weapon scheme and in campaign missions or standalone missions `onGameInit` is also used to add teams and hogs.
 
-First we have `onGameInit`. On this event we should add all game modifiers and team setup. If you are making a mission you only need to specify the things you want to change on this event, everything not changed will be set to default. The available game modifiers can be found here: [LuaAPI#onGameInit()]
+First we have `onGameInit`. On this event we should add all game modifiers and team setup. If you are making a mission you only need to specify the things you want to change on this event, everything not changed will be set to default. The available game modifiers can be found here: [LuaEvents#onGameInit()]
 
 An example of setting up Barrel Mayhem in a style:
 {{{
@@ -82,9 +82,9 @@
 AddTeam("Team", 0xFF0002, "Simple", "Island", "Default", "hedgewars")
 AddHog("Hedgehog", 0, 1, "NoHat")
 }}}
-To be able to play you must add another team and hog that should have another team color (this team has `0xFF0002`) or if you only want one team add the game flag `gfOneClanMode`. Look into [LuaAPI] to see what the other parameters of `AddTeam` and `AddHog` are.
+To be able to play you must add another team and hog that should have another team color (this team has `0xFF0002`) or if you only want one team add the game flag `gfOneClanMode`. Look into [LuaGameplay] and [LuaGears] to see what the other parameters of `AddTeam` and `AddHog` are.
 
-In `onAmmoStoreInit` you set what weapons is available in the game. For every weapon run [LuaAPI#SetAmmo_(ammoType,_count,_probability,_delay,_numberInCrate) SetAmmo].
+In `onAmmoStoreInit` you set what weapons is available in the game. For every weapon, run `SetAmmo` (see [LuaGameplay]).
 This is used to set both starting weapons and weapons found in crates.
 
 Here is an example of the initiation of a training mission:
@@ -118,7 +118,7 @@
 
 Each gear has a [GearTypes gear type], for instance, a bazooka shell has the gear type of `gtShell`, a grenade has a gear type of `gtGrenade`, and so on. You will almost always need to check for the gear type with `GetGearType` in the `onGearAdd` function in order to do anything meaningful.
 
-Gears also have a lot of various values to track their position, state, etc. These can be accessed and written to with several “getter” and “setter” functions like `GetPos`, `GetHealth`, `SetTag`, etc. See [LuaAPI] for a full list. In Hedgewars, the gear values and some variable names do not always really mean what they seem to be, their concrete meaning often depends on the actual gear type. For instance, using `GetHealth(h)` on a hedgehog gear (gear type: `gtHedgehog`) will return its health (obviously). Less obviously, using `GetHealth` on a flying saucer gear (gear type: `gtJetpack`) will return its amount of fuel.
+Gears also have a lot of various values to track their position, state, etc. These can be accessed and written to with several “getter” and “setter” functions like `GetPos`, `GetHealth`, `SetTag`, etc. See [LuaGears] for a full list. In Hedgewars, the gear values and some variable names do not always really mean what they seem to be, their concrete meaning often depends on the actual gear type. For instance, using `GetHealth(h)` on a hedgehog gear (gear type: `gtHedgehog`) will return its health (obviously). Less obviously, using `GetHealth` on a flying saucer gear (gear type: `gtJetpack`) will return its amount of fuel.
 
 To learn all the gory detaily about gears, see [GearTypes].
 
@@ -138,7 +138,7 @@
 
 Continue with the following pages to learn more:
 
- * [LuaAPI] contains a reference of most available functions and global variables
+ * [LuaAPI] is the central landing page for everything about the Lua API
  * [Missions] for a more in-depth guide on how to create missions
  * [LuaLibraries] contains information about “libraries”, that is, extra scripts you can include for even more functions. One common library is `Locale` for making a mission translatable
- * [GearTypes] contains the list of all gear types, along with an explanation of how the gears and their values work
\ No newline at end of file
+ * [GearTypes] contains the list of all gear types, along with an explanation of how the gears and their values work