• First Gamemode Question
    21 replies, posted
  • Avatar of Mangmasta
  • Hi, I'm making my first game mode and I have run into some problems. How do I attach something through lua? (like the same way it would be if you go into the model browser and go to file -> load weapon)
  • Avatar of zzaacckk
  • I'm not clearly understanding what you are saying... Put it in the addons folder?
  • Avatar of SchumacherAlt
  • I don't quite understand what you're doing, do you mean [lua] include( " dir " ); [/lua] or [lua] AddCSLuaFile( " dir " ); [/lua] What are you trying to do? Explain this more.
  • Avatar of SchumacherAlt
  • [QUOTE=butters757;21696204]I believe he's talking about attaching a model to a bone.[/QUOTE] Oh that'd make sense, Then what is [QUOTE] (like the same way it would be if you go into the model browser and go to file -> load weapon) [/QUOTE] suppose to mean.
  • Avatar of Mangmasta
  • Yeah, im sorry if I did not word it correctly. I meant to ask how you would achive the same thing, through lua, the thing that would happen if you went into the model browser, in source sdk, load a model, then go to file -> load weapon, so It would attach to their hand.
  • Avatar of Mangmasta
  • Aww come on! is the problem really that hard? I really need some help please! *BUMP*
  • Avatar of stealthpaw
  • Not hard, but believe it or not the people on this forum also have lives. This this what you mean? [URL="http://wiki.garrysmod.com/?title=Player.Give"]Player.Give [IMG]http://wiki.garrysmod.com/favicon.ico[/IMG][/URL]
  • Avatar of HeavyMtl123
  • [QUOTE=Busymonkey;21714084]Is that what you meant!? Giving the player a weapon!? :effort: Yea, use Player.Give.[/QUOTE] Dear god, if that what he actually meant, than god help this kid when he tries to code full-scale.
  • Avatar of Mangmasta
  • No, no, that's not what I ment. I mean to ask: how do you simulate the action done by the model viewer when you load a weapon. Here, I'll tell you what I'm working on. I am trying to make l4d2 SWEPs and I had problems figuring out how the view models work. In model viewer, if you load the weapon view model, the hands are not there. I figured out how to get the hands attached by going to file->load weapon, then choose the hands model. My question is: how would I "load the weapon" (the hands model) on to the gun through Lua?
  • Avatar of Busymonkey
  • Okay, so you want your hands to be on the weapon? [editline]02:01PM[/editline] You are really bad at explaining stuff. [editline]02:08PM[/editline] and why is the thread called Gamemode question, when you're asking for help with SWeps? :effort:
  • Avatar of Mangmasta
  • Sorry, I'm making SWEPs for a gamemode. You're right, I should have named it differently. In fact, I'll rename it now. Yes, the bottom line is that I want the hands on the gun. My friend told me a way to do it by recompiling, but I don't want to do that for 2 reasons: 1) I don't want the client to download custom models and stuff. It should all be accessed through gm_mount 2) MDLDecompiler doesn't work on my computer (tier0.lib is not found). [editline]Nah[/editline] Nah, Im not going to change the title.
  • Avatar of Legend286
  • Basically, he wants the separate v_hands mdl file to attach onto the view where the weapon model he's using is. Like in TF2 with the C_ models which are just the weapon with no hands that gets attached into the first person view and syncs with the animations.
  • Avatar of Legend286
  • It's not a prop, it's another viewmodel which contains the hands. The two viewmodels combine and play the same animation to make it seem like the weapon is in the hand. It's just some retarded way valve are using for their new games.
  • Avatar of c-unit
  • I think he is talking about when you click on AK-47 a model of the AK comes up?
  • Avatar of Mangmasta
  • [QUOTE=c-unit;21744653]I think he is talking about when you click on AK-47 a model of the AK comes up?[/QUOTE] No.... [QUOTE=Legend286;21734325]Basically, he wants the separate v_hands mdl file to attach onto the view where the weapon model he's using is. Like in TF2 with the C_ models which are just the weapon with no hands that gets attached into the first person view and syncs with the animations.[/QUOTE] YES!
  • Avatar of Busymonkey
  • [QUOTE=c-unit;21744653]I think he is talking about when you click on AK-47 a model of the AK comes up?[/QUOTE] :milk: [editline]03:06PM[/editline] Anyways, modeling is outta my league, sorry.
  • Avatar of c-unit
  • [QUOTE=Busymonkey;21752882]:milk: [editline]03:06PM[/editline] Anyways, modeling is outta my league, sorry.[/QUOTE] :wtc: