#need help fixing code in lua
1 messages · Page 1 of 1 (latest)
otherwise, weapons will always parent to the anim_attachment on the players right hand
i know i am adding the model to a server i play on
i have most of the code but i need help fixing it to make it look how i want in in game
can you hop in general 2 vc
no, I’m on my phone at work.
well i have the base code for it that i got from another addon and i am trying to recode it to work with my model and textures do you know how to help me with that
what addon are you basing it off of?
If you have a model that would mean you’ve setup the bones for it by now, yes?
targeted explosion addon
I have no idea what that is
it is just a addon of someon holding a small tablet in one hand
But anyways, it should be as simple as switching out SWEP.ViewModel with your new viewmodel
If the problem is with the model then that’s kinda on you; recompile it until it looks right
are the hands not appearing?
i got that already but its the problem of the model not having the textures i added and it is not in the hand
…the tablet isn’t in your hand?
What does it look like in game? Can you share a screenshot?
it is not in the hand it is flouting off to the side
i want it to look like this
but i got this
Assuming the hands placed correctly in Blender, your material probably has $noz applied to it or similar, so is trying to render on top of everything else. Post your .vmt script
"VertexlitGeneric"
{
"$basetexture" "models/darken/tv_screen_capybara/tv_screen_capybara"
}
is that what you wanted
Ok, so something else is going on then.
Feel free to dump the addon folder into a .zip, and try sending it here. Someone else can take a look at it cause I have to go to work
Oh, no, the screen is definitely in front of the hands.
Yeah....
Just keep saving over your file until you get a good position.
As for the material... Keep in mind, that's a material override, which overrides all materials on the model. Models can have multiple materials, not just 1
You probably wont be able to set submaterials with the weapon base you're using
...Ooop.
v.subMaterails exists (it's a table)
if (v.subMaterails) then
for k,v in pairs(v.subMaterials) do
model:SetSubMaterial(k - 1, v)
end
end
...wait
Fucking.
Okay, set subMaterails=true and subMaterials = {"your/material", "the/other/material"} in your VElements table
The author of the base misspelled Materials in the first if condition