• Making Vehicles in gmod
    15 replies, posted
Ok, so I am attempting to make a vehicle in gmod. No, not with phx props or any shit like that. I am talking about making a vehicles similar in the Gmow pack, MW Vehicles, Fueled Mod Pack, and etc.... Are there any good tutorials out there, because I cannot find jack shit.
As far as I know there aren't any tutorials for making vehicles.
Then how the hell are people making vehicles then if there is no tutorials....
They know how to code.. Try downloading a vehicle and look at the LUA code of it to teach yourself.. You will then have to make your own models and so on..
[QUOTE=AncientFryup;19690416]They know how to code.. Try downloading a vehicle and look at the LUA code of it to teach yourself.. You will then have to make your own models and so on..[/QUOTE] I have already done that and have manipulated the lua code. [CODE]local V = { Name = "Caterham", Class = "prop_vehicle_jeep", Category = "Fueled", Author = "Master Chris", Information = "Caterham", Model = "models/caterham/caterham.mdl", [B]AdjustSitPos = Vector(-15,40,20), Angle(0,-90,-90),[/B] HeadLights = { Light1 = {Pos = Vector(-13,-53,32), Ang = Angle(0,10,90)}, Light2 = {Pos = Vector(18,-53,32), Ang = Angle(0,-10,90)} }, Horn = {Sound = "vu_horn_double.wav", Pitch = 90}, Customexits = { Vector(-90,36,22), Vector(82,36,22), Vector(22,24,90) ,Vector(2,100,30) }, SeatType = "jeep_seat", ModView = { FirstPerson = Vector(0,0,4) }, HideSeats = true, -----Hide the passenger seats? KeyValues = {vehiclescript = "scripts/vehicles/Caterham.txt", SetBodyGroup = 7, Skin = 4 } } list.Set( "Vehicles", "Caterham", V )[/CODE] I have attempted to change the AdjustSitPos line and only the vector part is working. But the angle part is not.
Change the angle to something very absurd and see if there is a noticeable change in the game.
I have changed the angle on the x,y, and z and nothing changes.
Hmm, don't know what to tell you then.
I Looked The Code And Other Veichels And Realized that Cars Arent Scripted in Lua for the most part Like you can see in your code It Load a Code At This Part vehiclescript = "scripts/vehicles/Caterham.txt" Thats The Script Other Addons Dont even have the first part so Look at that code
[QUOTE=Gamecrafter;49596343]I Looked The Code And Other Veichels And Realized that Cars Arent Scripted in Lua for the most part Like you can see in your code It Load a Code At This Part vehiclescript = "scripts/vehicles/Caterham.txt" Thats The Script Other Addons Dont even have the first part so Look at that code[/QUOTE] He probably figured it out or lost interest in the 6 year window.
[QUOTE=HappyGhetto;49596585]He probably figured it out or lost interest in the 6 year window.[/QUOTE] Well, I haven't 'lost interest' for there are no tutorials still on making vehicles through lua. I wonder, though, if it's possible to make a simple car as duplication save and would it be converted into lua code? Anyway, after six years, no tutorials or examples (like swep) on how to make your own vehicle? Sure, can look into other's code, but usually there are too many additional options I don't need for a simple thing and no explanation on every phrase, like what part doing what exactly. Quick redirection on how to attach a model (ragdoll?) for your vehicle? Add more than 1 seat position? Turrets like on the original hl2 cars or airboat? Much thanks in advance.
HL2 vehicles are a single model. The model MUST be specifically tailored to be a vehicle, just a random car model will not do. NO, you cannot convert a dupe into a hl2-like driveable vehicle. It's just not how it works. You will never be able to. That's why things like seats and chairs exist. The Lua part for these vehicles is minimal and is simply required to add the vehicle to a list, nothing more.
adding to rubats paragraph above, vehicles need a specific text file wich defines speed, acceleration, brake etc.
[QUOTE=whitestar;51073887]adding to rubats paragraph above, vehicles need a specific text file wich defines speed, acceleration, brake etc.[/QUOTE] And also require custom sounds with sound cues so that they don't sound like complete crap.
Ah, I guess that explains why there are lots of ent-based vehicles or scripted cars. No tutorials on those also? Not even some basic vehicle_base preset for further customisation?
I've never found a real tutorial about cars, its more or like Trial and Error I guess? Look at other scripts and figure it out.
Sorry, you need to Log In to post a reply to this thread.