Multiple shootable weapon scripts on same item?

zoicelols

Member
I have a custom pistol character and i attached 4 different use abilities to activate each different shot animation. I have 4 different shootable weapon components on the pistol but only the first one at the top will play an animation. Also i have aim disabled. Im going for pistol attacks that play an attack and then stop.

Do i need to make 4 different guns so i can play 4 different gun shot animations? 4 shootable weapon scripts on one gun seems broken.
 
Last edited:
Multiple shootable weapon components are no problem - you'll need to make sure you have a corresponding use ability that uses each shootable weapon's action ID. Take a look at the demo scene for an example - this is for the melee weapon but the sword has three or four melee weapons that can each be used.
 
Multiple shootable weapon components are no problem - you'll need to make sure you have a corresponding use ability that uses each shootable weapon's action ID. Take a look at the demo scene for an example - this is for the melee weapon but the sword has three or four melee weapons that can each be used.
I already have action id 1 through 4 for the 4 different shoot animations and 4 different use ablities tied to the action id of each. The abilities show that they activate during play, but no animation except for the first top level shootable weapon script.
 
Okay so when I try to use the other abilities that dont play the animation, I get stuck in an aimmovement state loop animation.
I have the aim ability turned off and I even changed the slot0ItemStateIndex parameter from 2 to 90 so it didnt match my other animations that use 2. Yet it still swaps to this state when I try to use the other abilities on my pistol weapon. How could it even transition here if the parameters needed to swap to this state are not fullfilled?

1392

Also after I have used the other abilities, they get stuck and the only way to break out of it is to use Action 1, Hold Forward Attack. it plays the animation and unsticks him. Also my other abilities never send the Itemuse and itemusecomplete events, but I do have them attached to the animations.

1393
 
Last edited:
I just tried a small test case with two shootable weapons and it worked. There is a lot going on in your screenshots so I recommend simplifying it as much as possible and just get two actions working using a button down start type first. From there you can slowly build upon it.
 
Okay this time I actually completely redid my project from scratch to make sure it wasn't on my end for the inconsistency.

So this time around even though I set up the right pistol with 2 shootable weapon components, once again the first action id on the pistol gets priority and actually will fire while any shootable components below it will now send the substate 11 which is default as the dry fire substate. Why would it send the dry fire substate even though I copied the exact same way I set up the first shootable weapon component on the pistol? The 2nd shootable weapon component has a substate of 2. not 11.

Also my use ability "Hold Right Attack" will go active and send the action id 2 to the shootable weapon component which is supposed to send the substate 2 to the animator, but it just gets stuck active because the substate 11 is what is sent for some reason.
 
Okay I figured it out. I needed to use a different consumable type than the other shootable weapon script. They were sharing the same pistol bullets.
 
Top