The shotgun cannot attack after being pressed to reload ammo

cangcloud

Member
I created a shotgun, but when I pressed to reload ammunition ... And the reloading ammo animation is not played, and the attack can no longer be carried out, the problem is strange and I need help .
 
Judging by the model it looks like you made your own shotgun, just compare the generic reloader module from your shotgun and the Shotgun Weapon prefab from UCC and see if anything's different. You can also copy paste the whole Shootable Action component from the demo shotgun onto yours and see if it works perfectly.
 
Judging by the model it looks like you made your own shotgun, just compare the generic reloader module from your shotgun and the Shotgun Weapon prefab from UCC and see if anything's different. You can also copy paste the whole Shootable Action component from the demo shotgun onto yours and see if it works perfectly.
Thank you for your reply I'll try.
 
Judging by the model it looks like you made your own shotgun, just compare the generic reloader module from your shotgun and the Shotgun Weapon prefab from UCC and see if anything's different. You can also copy paste the whole Shootable Action component from the demo shotgun onto yours and see if it works perfectly.
Still no, the shotgun created can shoot, but it cannot be reloaded, once it is loaded ... The shotgun won't shoot again, Justin should check the shotgun code, this question is really weird.
 
Oh wait, I’m sorry I completely forgot I stumbled upon the same issue not so long ago, it was caused by some incorrect animation transition. Is your character using the Demo animator from UCC ? And does the issue occur whether your character is aiming or not ?
I’m not on my laptop right now, I’ll let you know after I take another look at my own animator.
 
Alright, here it is ! As crazy as it sounds, the issue in my project (and presumably yours as well) was caused by an incorrect animation transition on the Rocket Lancher sub-state machine on the Arms Layer. If you select the third transition from the link between Any State and Aim and add the condition Aiming Equals True then the issue should be fixed and you should be able to reload while aiming.

Capture d’écran (1844).png

Let me know if this fixes the issue for you ! If it doesn't please confirm whether Aiming while reloading changes anything or not, and in what animation your character is in when stuck.
 
@Cheo is right onto it I think, check the animation event is being fired, or uncheck the Wait For Animation Event bool under the reloader modules Reload Complete Event foldout.
 
Hold on, there's one more thing that slipped my mind - it seems that the reloading issue occurs not only when you're aiming but also not moving, if you're reloading while aiming and moving then the reloading should be correctly animated. Can you please confirm that before trying the fix I showed you @cangcloud

Also the incorrect transition may not necessarily be the third one, check for all three.

Edit : dammit there must be something else than the aiming condition of course because it has be true at this point - not a bad thing to add it though. Lemme check again.
 
Okay so this time I've got things cleared out on my side at least : the really incorrect part was on the first condition for Any State to Aim on Rocket Launcher, which was missing is Slot0ItemID Equals 6. This was apparently corrected in one of UCC's releases, but if like me you had been working with a duplicate of the Demo animator for some time then this explains the issue. So I have to ask again : does the issue occur with the Demo animator as well ? If yes, then this suggests there must be a weapon setup issue. If not, then you probably had the same animation issue I did.
 
@Cheo is right onto it I think, check the animation event is being fired, or uncheck the Wait For Animation Event bool under the reloader modules Reload Complete Event foldout.
I just tried it and it still doesn't work, now I can only hope that Justin will see it and fix it in the next update.
 
Hold on, there's one more thing that slipped my mind - it seems that the reloading issue occurs not only when you're aiming but also not moving, if you're reloading while aiming and moving then the reloading should be correctly animated. Can you please confirm that before trying the fix I showed you @cangcloud

Also the incorrect transition may not necessarily be the third one, check for all three.

Edit : dammit there must be something else than the aiming condition of course because it has be true at this point - not a bad thing to add it though. Lemme check again.
1694999091834.png
The Aiming value has always been false.
 
In the case of equipped with a shotgun, the player does not use aiming... This problem still occurs when you press to reload the ammunition and this problem has nothing to do with aiming.
 
It’s weird because in the video it really looks like you’re pressing right click to aim ! But I see on your screenshot that you're using the Demo animator. To be absolutely sure, may I ask you to check all the transition conditions from Any State to Aim on the Rocket Launcher sub-state on the Arms layer ?

What you can test next is giving your character the demo shotgun or a duplicate of it, and see if it works perfectly.
 
This does sound related to animation events. If you are waiting on an animation it probably isn't being sent.
 
Top