• I'm a beginnger lua coder, Where do I start?
    21 replies, posted
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.
[QUOTE=thomasfn;23853602]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.[/QUOTE] Thanks [QUOTE=thomasfn;23853602] Oh and I suggest you don't sign your posts - we already know who you are.[/QUOTE] 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
[QUOTE=Chris220;23853924]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[/QUOTE] 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:
[QUOTE=Chris220;23855437]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:[/QUOTE] 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
[QUOTE=Roflc0pter;23855640]Thanks, Odd.. I don't have the bouncy ball script in SteamUserDir/garrysmod/garrysmod/lua/entities[/QUOTE] [url]http://luabin.foszor.com/code/addons/default_sent_pack/lua/entities/sent_ball[/url]
[QUOTE=Roflc0pter;23855640]Thanks, Odd.. I don't have the bouncy ball script in SteamUserDir/garrysmod/garrysmod/lua/entities[/QUOTE] 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?
[QUOTE=Roflc0pter;23870102]Oh and just wondering, What is the default Run Speed and the Default Walk Speed?[/QUOTE] According to [b][url=http://wiki.garrysmod.com/?title=Player.SetRunSpeed]Player.SetRunSpeed [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] and [b][url=http://wiki.garrysmod.com/?title=Player.SetWalkSpeed]Player.SetWalkSpeed [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] it's 500 and 250. Use the wiki, it's awesome. Especially the [url=http://wiki.garrysmod.com/?title=Player]Player [/url] and [url=http://wiki.garrysmod.com/?title=Entity]Entity[/url] libraries.
[QUOTE=Roflc0pter;23853831]Thanks It's just [s]Human[/s] My nature.[/QUOTE] 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
[QUOTE=overnightfuture;23919422]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[/QUOTE] I think you need to [b]brush[/b] 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!
Can I learn lua with you Chris I want to learn how make That companion cube
:ohdear: Well... yeah if you want. <---- My steam profile is under my avatar over there
Sorry, you need to Log In to post a reply to this thread.