• Holster Animation before Weapon switch.
    10 replies, posted
I have no idea how I should do this, everything I have tried doesn't work. [URL="http://wiki.garrysmod.com/page/GM/PlayerSwitchWeapon"]This is the function I have fiddled with.[/URL]
i havent tried this either but it could work in that function. OR you could make your own weapon base and override SWEP:Holster and do it there but thats kinda stupid heh... :l anyways, playing with animations is a little tricky. iv only played around with gestures, which assuming you can use the same functions for gestures with anims shouldnt be a problem. player:AnimRestartGesture(enum gesture slot, int activity/sequence, bool dont loop) gesture slot enums can be found here: [url]http://wiki.garrysmod.com/page/Enums/GESTURE[/url] activity/sequences can be found here: [url]http://wiki.garrysmod.com/page/Enums/ACT[/url] is the boolean at the end of the function is true the animation will loop indefinitely until you play something else in the same gesture slot. [editline]28th May 2013[/editline] also i was just thinking, the reloading animation could do for a nice weapon switch animation :)
I'll add some of those gestures to my scripts when changing weapon. I just think that I just need to make a timer inside the function, and before it, make it play ACT_VM_HOLSTER.
bump.
whats the bump for?
Because what I'd like to do is that the VIEWMODEL does the holster animation.
Does the weapon have a holster animation?
[QUOTE=Nopari;40839034]Because what I'd like to do is that the VIEWMODEL does the holster animation.[/QUOTE] jost override the view model position in the SWEP and make it check if you are holstering the weapon or something.
Yes, it has. I tried to return it when the sequence time has gone, but it wont change until I doubletap it. And calling it just makes it repeat.
You can check out how this is done in one of Stargate mod weapons. No idea where you can find them though.
[QUOTE=Robotboy655;40851422]You can check out how this is done in one of Stargate mod weapons. No idea where you can find them though.[/QUOTE] I can't find them either. I have made progress with the code, I got it to stack overflow :v:
Sorry, you need to Log In to post a reply to this thread.