Hi, i suck at titles so ill try to explain as best as i can.
Im trying to make two weapons switch to eachother, the way im currently doing it is by:
Playing the Holster Montage > Weapon Switch Event > Playing the Equip Montage
My problem however is that 90% of the time when i switch, there is a frame where the weapon reverts to the idle pose before playing the equip animation, and no matter what i do cant stop that.
I would also like to mention i have Auto Blend Out
on the holster animation turned off, and instead use a notify near the last frame to switch.
It just seems that nothing i do can get the holster animation to stay at the ending position without returning to the idle position for a frame. (however to reiterate, maybe like 10% of the time the montages work fine, so idk)
Thanks in advance - Me
Hey @KXRules78!
How are you doing the montages? PlayMontage or PlayAnimMontage? PlayMontage gives a lot more workable space. Maybe change the weapon model after starting the second montage, so it’s guaranteed to change afterwards?
Get us some screenshots and we can probably figure out a more accurate idea!
Im using Play Montage
, and the issue kinda lies within the montage itself, not really the weapon swapping.
I use the same code for the primary just with a few tweaks
I uploaded a video which showcases the issue, sometimes it does it correctly and other times it does the one frame idle thingy, however the video makes the former look more prevalent than it actually is (AKA the issue happens more than the video shows).
I honestly cant figure out any way to prevent this from happening, so help would be appreciated.
Thanks - From Me
Okay I think with a little more information to YOU, you might understand it and figure it out, or with a little more information to US, we might understand it and figure it out.
What if you run the execution from the first playMontage to the second using “OnCompleted”?
Also, what does “Update Weapon Animations” and “Secondary Weapon Switch” do? It could be important!
Right my bad sorry, i forget that coding can be unpredictable.
Update Weapon Anims is just a placeholder for now, so it shouldnt do anything.
Weapon Switch just hides the primary weapon, then unhides the secondary weapon, focus on “HIDE”, not spawn, the two guns are always there but one is just hidden (and it executes on server so i doubt it can affect much animation.)
The reason i didnt do this is because i have tried it without the scripts, and it does the same thing - which may not have been clear if i said that before.
As for my ABP, in case its important.
This just connects to the output (through an extra offscreen blend poses by bool but thats just a placeholder, so it does nothing)
WalkOrIdle
Aim_WalkOrIdle
Other than that, theres not much affecting animations when swapping weapons
Judging by the video, it looks like you need to actually allow it to blend and start the next animation. It’s usually not good to have notifys run events- because that frame could be skipped! They’re not governed by tick, so it gets dodgy. Regardless, you could 100% do the switch on completed, and leave auto blend on. Off the top line, run a delay for 90% or so time of your first anim, then start the second anim (causing it to blend out/in). Your issue is that you have 0 blending so they’re not overlapping, giving you a 1-frame gap.
Honestly, thanks. I didnt really think to put the notify at the beginning and then delay the next things to happen, as my notify node was near the end and i thought that would cause a blend to the holster, but i digress.
As for what i did, in case anyone cares.
added a delay between the holster and the rest of the code as well as removing the notify as it was pointless.