I'm a beginnger lua coder, Where do I start?

Hey guys,

So…I’m a beginner lua coder and I’m not so sure what to start with.
I understand types, loops, hooks and I’m not good at HUD’in.
I don’t know exactly where to start,
I don’t know whether to do gamemodes, Swep’s, Sent’s or hacks.

So FP, What did you start doing when you were first learning lua?

Thanks,
Roflc0pter

If you understand types, loops, and hooks, then you should have a go at making some SWEPs or SENTs. Start off with some basic ones, maybe use some popular weapon base and edit stuff. Then when you think you’re getting bored and want to move on, try making a simple gamemode.

Oh and I suggest you don’t sign your posts - we already know who you are.

Thanks

It’s just [del]Human[/del] My nature.

Speaking from experience (I only started scripting with Lua in the last week), have a go at making a simple SENT. I made a companion cube that played various sounds from portal depending on what you did with it

I’m trying to make a SWEP now, and it seems like quite a big copy+paste operation to make one that fires bullets at a certain rate :v: Maybe that’s just me though

Is there a scripted entity base or template?

You could work off garry’s bouncy-ball SENT I guess

Or just download one from garrysmod.org like the Cactus or something.

If you want to add me on steam, I’d be happy to work on something with you; we can learn together :v:

Thanks,
Odd… I don’t have the bouncy ball script in SteamUserDir/garrysmod/garrysmod/lua/entities

it is in your GCF, use GCFScape(google it) to extract it

http://luabin.foszor.com/code/addons/default_sent_pack/lua/entities/sent_ball

Yeah for some reason it’s all inside the GCFs now, so sandbox + manhack gun + bouncy ball and so on aren’t in your garrysmod folders

Oh and just wondering,
What is the default Run Speed and the Default Walk Speed?

According to **[Player.SetRunSpeed

http://wiki.garrysmod.com/favicon.ico](http://wiki.garrysmod.com/?title=Player.SetRunSpeed)** and **[Player.SetWalkSpeed

http://wiki.garrysmod.com/favicon.ico](http://wiki.garrysmod.com/?title=Player.SetWalkSpeed)** it’s 500 and 250.

Use the wiki, it’s awesome. Especially the Player and Entity libraries.

Fyi, it’s [del]. So it would be “[del]Human[/del] My nature”.

If I were you, I would just fuck around with DarkRP. It’s a shitty base/gamemode, but it’s easy to modify.

BrightLiteFilms, no offense but that’s an awefull idea. Editing a big gamemode like that isn’t going to teach him much aside from the extreme basics, and it wont likely teach him ANYTHING if he already knows one programming language.

What I would do is start off making esp/chams. To do that efficiently you have to learn hooks, loops, tables, if/then/else, you pretty much cover all of the basics.

I’ve noticed that people often are so nicely to add comments in their scripts that they release. (Descriptions of what the next section of lua code does and such.)

Maybe you should try to take at that? I’ve learned a lot from the comments myself.

im just starting and the best thing i did was try and make a gamemode from scratch, yea that didnt work tho so i am going to try and make a sweep XD

I think you need to brush up on your grammar and spelling.

Start with making SWEP’s or SENT’s.

I’ve started coding with Chris,
I might tell you what the project is before it is finished or I may keep it a secret MUHAHAHAHA!