diff options
| author | Alexander Pickering <alexandermpickering@gmail.com> | 2018-02-28 09:41:23 -0500 |
|---|---|---|
| committer | Alexander Pickering <alexandermpickering@gmail.com> | 2018-02-28 09:41:23 -0500 |
| commit | 5fd5f2b3d1c77c3b85355c452ffc7e1fe2e12162 (patch) | |
| tree | ba03a7c2975e2c5c88732cc28be90365e6cd41aa /tutorials/tut010_first_addon.md | |
| parent | a77ee4ce201de757ce4c5958d9e499a65b2cf416 (diff) | |
| download | artery-5fd5f2b3d1c77c3b85355c452ffc7e1fe2e12162.tar.gz artery-5fd5f2b3d1c77c3b85355c452ffc7e1fe2e12162.tar.bz2 artery-5fd5f2b3d1c77c3b85355c452ffc7e1fe2e12162.zip | |
Fixed some types, worked on 0x050
Fixed typos in a bunch of tutorials, did a little more work on 0x050 -
Entities
Diffstat (limited to 'tutorials/tut010_first_addon.md')
| -rw-r--r-- | tutorials/tut010_first_addon.md | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tutorials/tut010_first_addon.md b/tutorials/tut010_first_addon.md index d4f8cb1..2fddb28 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/data/pac3/my_pac.txt` it will appear in the pac editor as a pac you can load! +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! -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 as 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'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). ## Lets get started @@ -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. +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} |
