aboutsummaryrefslogtreecommitdiff
path: root/tutorials/tut010_first_addon.md
diff options
context:
space:
mode:
authorAlexander Pickering <alexandermpickering@gmail.com>2019-05-04 15:52:00 -0400
committerAlexander Pickering <alexandermpickering@gmail.com>2019-05-04 15:52:00 -0400
commitfaa8312074e6ea8a96efd70d6188ef592f81e579 (patch)
tree5b2d47dae86a2f5fd96c379a20163177b44e20ea /tutorials/tut010_first_addon.md
parent984401ce1f84581786f9e3241caf96bda718940b (diff)
downloadartery-faa8312074e6ea8a96efd70d6188ef592f81e579.tar.gz
artery-faa8312074e6ea8a96efd70d6188ef592f81e579.tar.bz2
artery-faa8312074e6ea8a96efd70d6188ef592f81e579.zip
Updated tutorials
Various fixes and updates for the tutorials
Diffstat (limited to 'tutorials/tut010_first_addon.md')
-rw-r--r--tutorials/tut010_first_addon.md8
1 files changed, 4 insertions, 4 deletions
diff --git a/tutorials/tut010_first_addon.md b/tutorials/tut010_first_addon.md
index 2fddb28..9c5a3dd 100644
--- a/tutorials/tut010_first_addon.md
+++ b/tutorials/tut010_first_addon.md
@@ -4,9 +4,9 @@
A quick primer on addons for Garry's Mod, and Artery.
-You may have seen on the gmod wiki, instructions on running lua code. One way is to place files in your `garrysmod/lua/autorun` directory, and they will be run automatically when you enter single player. This can get messy though, another way to run lua is by making a folder in `garrysmod/addons/<addon_name>/lua/autorun`, and placing your scripts in that (i.e. so that `garrysmod/addons/my_first_addon/lua/autorun/hello.lua` is a valid file). As it turns out, all folders under `garrysmod/addons/<addon_name>` get reflected! This means that if you have a file `garrysmod/addons/my_addon/data/pac3/my_pac.txt` it will appear in the pac editor as a pac you can load!
+You may have seen on the Garrysmod wiki, instructions on running Lua code. One way is to place files in your `garrysmod/lua/autorun` directory, and they will be run automatically when you enter single player. This can get messy though, another way to run Lua is by making a folder in `garrysmod/addons/<addon_name>/lua/autorun`, and placing your scripts in that (i.e. so that `garrysmod/addons/my_first_addon/lua/autorun/hello.lua` is a valid file). As it turns out, all folders under `garrysmod/addons/<addon_name>` get reflected! This means that if you have a file `garrysmod/addons/my_addon/data/pac3/my_pac.txt` it will appear in the PAC editor as a PAC you can load!
-This is the method used by addons for Artery. Since Garry's Mod loads addons's autorun BEFORE gamemodes, Artery uses the `data/artery/global/` folder to run scripts after the gamemode has loaded (and therefore has access to the nrequire() function, more on this later).
+This is the method used by addons for Artery. Since Garry's Mod loads addons' `autorun/*` BEFORE `gamemodes/`, Artery uses the `data/artery/global/` folder to run scripts after the gamemode has loaded (and therefore has access to the nrequire() function, more on this later).
## Lets get started
@@ -18,7 +18,7 @@ Now another `garrysmod/addons/artery_rougelite/data/artery/`
And another `garrysmod/addons/artery_rougelite/data/artery/global/`
-With the folder structure set up, we're ready to actually write some lua.
+With the folder structure set up, we're ready to actually write some Lua.
Create a file `garrysmod/addons/artery_routelite/data/artery/global/helloworld.txt`
@@ -26,6 +26,6 @@ and copy+paste the following code into it.
print("Hello, world!")
-Now start up garrysmod with the Artery gamemode selected. Head into flatgrass or something. Open your console, you should see "Hello, world!" printed in your console(~)!
+Now start up Garrysmod with the Artery gamemode selected. Head into Flatgrass or something. Open your console, you should see "Hello, world!" printed in your console(~)!
Next tutorial: @{tut020_nrequire.md}