I get stuck at “The For Loop” on the tutorial series.
I’m only 12, and this is damn hard for a person like me, I’m going to attempt at it again later this year, and hopefully get it, but is it unusual for someone to not be able to understand it?
Also, in the series, they go to these functions and stuff, I wonder how the hell I’m going to find all these different functions, and how to put it all together.
I’m in a similar position as the OP. I decided to start learning Lua today. I spent about 4 hours going through the wiki tutorial, trying to understand as much as possible. After the tutorial though, I didn’t really know how to progress further, so I tried (very basically) to make a SWEP based on others, but it was kind of like jumping in the deep end and a lot of it went over my head. Any advice on where to go from here?
It might be helpful for the OP to know that he’s not the only one who finds the wiki tutorial confusing at times!
For learning I’ve always found editing helped me, get something, see it work and think of a way to change it. Like take the sent_ball that comes with gmod and make it bounce higher, or kill things on touch, and just read the info on the functions that make it work as you go, and then the ones you need to make the change. Don’t go releasing it or anything, just to learn from. Trying to read the entire wiki and remember it is hard, but if you can learn by applying it might be easier. Hope this helps.
Go in-game and start running the code you find on the wiki, edit it, think what might happen, run it. Did what you predict happen? If so, good job, otherwise try to understand why the outcome is different.
The gmod tutorials are not where you should be looking.
Gmod lua isn’t practical for learning - you should be doing console stuff for the for loops etc.
Also to the person that posted first, stfu - if somebody can’t understand a concept there’s absolutely no need for that kind of demotivating attitude; it really winds me up when people come to this section with bugger all knowledge acting cool when somebody is new.
Well, a year or so ago, I used to make weapons for a Flood Server, using Resource.AddFile to add models, etc. etc. but that is really it.
Sometimes, I edit values of lua code, etc. etc.
[editline]30th January 2011[/editline]
Well, all I could say was, I took code off of the SENT_Ball, and code off of another entity, and made an armor entity for DarkRP, which gives 100 Armor to whoever uses it, I made sure it had a V:Physics model or whatever, so it didn’t act like a bouncy ball, change SetHealth to SetArmor, etc. etc.