Once again, another problem. I have created a Spy-Cicle SWEP, and its been on the workshop for awhile now, but it has always had the viewmodel of a normal butterfly knife. I recently figured out c_models, and now my swep actually haves the spy-cicle in the viewmodel, but not in the way I want. It is held like a sapper, and has the sapper sounds.
[b]Here is the code to prove I have the proper viewmodel. There is more code along with this, but I'm not going into detail,[/b]
[code]
SWEP.ViewModel = Model( "models/weapons/c_models/c_spy_arms.mdl" )
SWEP.WorldModel = Model("models/weapons/c_models/c_xms_cold_shoulder/c_xms_cold_shoulder.mdl" )
[/code]
So once again, my SWEP's animations act like a sapper. How do I get them to replicate the spy's knife animation set from TF2?
I will include all the detail you wish.
[code]
self.Weapon:SendWeaponAnim( ACT_VM_HITCENTER )
[/code]
But that does not play anything! I know this is extremely confusing, but bassically, my SWEP's animations are acting like a sapper, when I want a knife. Is there anyway to change this or get the proper animation names? Please, don't hesitate to ask for info, I've been waiting forever to get this working
:v:
You gotta use Ent:ResetSequence() on the view model. There are far more animations in TF2 weapons then there are ACT_VM_ stuff
[QUOTE=Robotboy655;43087532]You gotta use Ent:ResetSequence() on the view model. There are far more animations in TF2 weapons then there are ACT_VM_ stuff[/QUOTE]
Hey Robotboy, thanks for replying. Do you know a location where I can find all of the animation names?
Open the model in the spawn icon editor in sandbox.
[QUOTE=Robotboy655;43087607]Open the model in the spawn icon editor in sandbox.[/QUOTE]
Alrighty! So this is going the direction I want! :D
Just a question, where would I put [b]Ent:ResetSequence()[/b] Into?
Before the animation line?
Also, would I replace
[code]
function SWEP:Deploy()
self.Weapon:SendWeaponAnim( ACT_VM_DRAW )
return true
end
[/code]
With
[code]
function SWEP:Deploy()
self.Weapon:SendWeaponAnim( knife_draw )
return true
end
[/code]
No. You can just open source code of fist swep in gmod and look how it's done. Do some research yourself dammit.
Sorry, you need to Log In to post a reply to this thread.