I want to make a gamemode but I have no knowledge of LUA...

So I’m thinking of making a gamemode which will be a very good bit of fun! but it’s quite a big project and will require a lot of knowledge of LUA, is it that hard to learn? and is there anyone here who is interested in working with me on this project?

I’m pretty sure nobody wants to work with someone they don’t know on a big project without some sort of payment. Either code it yourself, offer payment, or find some friends that could possibly help you.
If you want to start learning lua, I’d recommend you something smaller scale, getting the grip of it. Take a look at the http://www.lua.org/pil/ for the basics.

Whats the idea?

An I am Legend game mode, Basically during the day you have to go out and set traps but at night zombies come out(of the shadows) and if one of your traps catches one then you gain Xp or points. The Zombies are much harder and stronger meaning you have to build good defenses, if you go out at night and one of them sees you, they will chase you back to your base where they will probably kill you.

Sound good?

In my opinon, you should’ve had that information when you first made the thread, so people could get a good grasp on what it is your gamemode idea is about.

Sounds like a fun gamemode, wish I could help.

If you want to learn Lua, aim for a much smaller, less practical project. Come back to this when you’re good enough to code it.

I saw a movie some time ago, and it was the same idea. Ween the night comes out there are zombie and ween is day everyone is normal like nothing is happening. But they need to upgrade the house.

Lol, I am Legend is the name of the movie, R@R.

So could anyone help? And teach me LUA at the same time? :smiley:

[editline]31st January 2012[/editline]

Thing is, I already know quite alot of different coding and programming languages, so I would just need to know how LUA works with Garrys mod, Like how do you call upon something in the game and change it?

What other languages do you know? That statement “How do you call upon something in the game and change it?” is pretty vague (and quite honestly doesn’t make a lot of sense in the scope of gmod lua.

Function calling (if that’s what you are referring to is pretty basic.

[lua]
local valid_strings = {
“testing1”,
“testing2”,
“testing3”
}; --creates a new table containing the 3 strings.

function Example( arg ) --Declare Example as a function that accepts 1 arg
if( !arg ) then return; end --If no arg is passed, return and exit the function
if( type( arg ) != “string” ) then arg = tostring( arg ); end --Checks if the frist arguments datatype is string, if not it convertes it to a string.

for _, v in pairs( valid_strings ) do --loops through the table of valid strings
	if( string.lower( arg ) == v ) then --an if statement saying if the loercase version of the passed argument equals a value found in the table, then continue
		return "Argument is indeed valid";
	end --end the if statement
end --end the loop

return "Argument is not valid"; --if it's valid, it will return valid in the loop, else if it will exit the loop and return not valid

end --end the function

local valid = Example(“testing1”); --This ‘calls’ the function Example(), and passes the string “testing1” into scope. It will store whatever the function returns on th variable ‘valid’.[/lua]

That’s kind of a complicated example, but yeah that’s function calling. That’s a pretty basic feature in any programming language.

Well, I know PHP, JAVA, Javascript, So I know basic programming, So I guess all I need to learn is, the syntax, and how LUA files interact with Garrysmod, also what Shared.Lua init.lua and client.lua do then once I’ve learnt that then I can start to understand how Garrysmod itself works as I understand that alot of LUA in Garrysmod is orientated around the game and not LUA, if You know what I mean?

PHP and Lua are pretty similar, you should catch on if you are a decent PHP scripter.

If you already know some programming, then you should be able to catch on with Lua pretty quick. Anyways, I would start with smaller stuff like what KillerLUA said.

I’d say go with it, I have absolutely no knowledge about coding and I’m making a gamemode. I’m asking a lot of questions but still.

I agree, but you should first do the basic tutorials on the gmod lua wiki so you know where to start in making a gamemode. Also look up quick tutorials on youtube for the same thing.