jaunger1999
New member
Hi,
I'm writing a script that has an ai agent activate the use item ability and have encountered a problem.
I'm using this ability with an assault rifle. Whenever it's activated, as soon as the agent fires one shot it returns the gun to the resting position. The gun does have full auto enabled.
I attached some breakpoints to the uses of the StopAbility function in the Use class, and found the culprit is in the UseCompleteItem function which starts at line 810 of the Use class. So the ability is being deactivated because that function stops abilities whose animations have completed.
Is there any way I can manually turn the use behaviour on and off without this functionality? I'd prefer to not fiddle around with the included Use class.
Thanks.
I'm writing a script that has an ai agent activate the use item ability and have encountered a problem.
I'm using this ability with an assault rifle. Whenever it's activated, as soon as the agent fires one shot it returns the gun to the resting position. The gun does have full auto enabled.
I attached some breakpoints to the uses of the StopAbility function in the Use class, and found the culprit is in the UseCompleteItem function which starts at line 810 of the Use class. So the ability is being deactivated because that function stops abilities whose animations have completed.
Is there any way I can manually turn the use behaviour on and off without this functionality? I'd prefer to not fiddle around with the included Use class.
Thanks.