• How do I learn to lua?
    10 replies, posted
Where can I learn lua easy and fast? Please link me :D
wiki.garrysmod.com edit: Sorry for a short post. But this is the main tool you'll use to learn lua.
You can try the Garrysmod Wiki or some LUA page that has some tutorials. Or another alternative is to find someone to teach it to you. Preferably a friend because it would be stupid to go around begging everyone for their LUa knowledge. You could also study code in addons, but that's a fucking shitty way to learn.
[QUOTE=DesumThePanda;32103328] You could also study code in addons, but that's a fucking shitty way to learn.[/QUOTE] Not necessarily. It can be a great way to learn, but if they start stealing code that's different. Studying someone else's code can show you good coding habits.
Very carefully
It depends, some people prefer videos, if so, youtube it, i know someone did a series, which were quite good, how ever if you prefer wiki etc. [url]http://wiki.garrysmod.com/?title=Lua_Tutorial_Series[/url]
I started off making simple sweps from CSS weapons, which is primarily just editing values in a table, so its extremely easy and gets you a little acquainted with the file structure of addons. The next step I took was this simple tutorial series on youtube explaining how to make a very simple gamemode, which introduces a few important functions and commands. [url]http://www.youtube.com/watch?v=D-dvHFIyL5o[/url]
I learned by modifying gamemodes, like DarkRP.
I made a deathmatch game mode and i thougt i was top dog ;)
You can't learn it fast. You need to do things to practice and you will gradually memorize it. Usually you can just look stuff up on the wiki and figure it out though.
Basically spend some time studying someone else's code, checking the wiki for hooks, etc. After you feel you have a basic knowledge, start making some basic scripts. If the script works, move on to a harder one. For example, say I want to make a script that kills the player when running. When I get that to work, maybe I will make it only kill the player if they typed something in the chat(Like a chat trigger).
Sorry, you need to Log In to post a reply to this thread.