niltheory
New member
I'm currently integrating the Realistic Sniper and Ballistics System asset inside of Opsive with the usage case still needing to use the Opsive-based projectiles for items that aren't chambered ammunition. I've created a script called BallisticsHelper which inherits from ShootableAction since when I added the code to ShootableAction.cs the only thing that would show up in the inspector is the first boolean variable. It took a couple hours and migrating the initial prefab, I had to explicitly set specific references and make another version of the prefab using the Migration Manager.
Here's what initially works but needs more added to it because it otherwise works but shoots an unlimited amount of times regardless of the checking the clip and seeing how much ammo is left:
When the appropriate bool, isUsingAmmunition, is toggled, it will switch to the RSB system
So, far this is what I have but it's not perfect, there are some initial errors that throw into the console but I'm testing out different methods, quite literally:
I've noted the attempts that would cause a stack overflow to, I've currently nested another if, else statement where I'm trying to manually get what would normal happen after pressing use by using, the ShootableAction use and reload flow chart.
I'm thinking of replicating a little of what happens next but I'm not quite sure how to handle public virtual getters / setters:
What I do know is that I want to still use the data that's entered inside of the Modules in ShootableAction and then return, then edit that as if I was using the standard script. So, then, if alike when previewing the data to fire-- it will check to see if the ClipRemainingCount[index] is not equal to zero it will be able to be fired again, otherwise, it will be allowed to be reloaded. With that said, this is my next step to making it functional as per normal then, I can worry about the heavy reverb and delayed fire sound when the item is used.
The other occurring problem that caused issues initially was with this which I fixed by changing the OnAim method into a public override:
However it now continues throws an input error into the console, which is this:
Button "" is not setup. Please create a button mapping within the Unity Input Manager.
Here's what initially works but needs more added to it because it otherwise works but shoots an unlimited amount of times regardless of the checking the clip and seeing how much ammo is left:
When the appropriate bool, isUsingAmmunition, is toggled, it will switch to the RSB system
So, far this is what I have but it's not perfect, there are some initial errors that throw into the console but I'm testing out different methods, quite literally:
I've noted the attempts that would cause a stack overflow to, I've currently nested another if, else statement where I'm trying to manually get what would normal happen after pressing use by using, the ShootableAction use and reload flow chart.
I'm thinking of replicating a little of what happens next but I'm not quite sure how to handle public virtual getters / setters:
What I do know is that I want to still use the data that's entered inside of the Modules in ShootableAction and then return, then edit that as if I was using the standard script. So, then, if alike when previewing the data to fire-- it will check to see if the ClipRemainingCount[index] is not equal to zero it will be able to be fired again, otherwise, it will be allowed to be reloaded. With that said, this is my next step to making it functional as per normal then, I can worry about the heavy reverb and delayed fire sound when the item is used.
The other occurring problem that caused issues initially was with this which I fixed by changing the OnAim method into a public override:
However it now continues throws an input error into the console, which is this:
Button "" is not setup. Please create a button mapping within the Unity Input Manager.
UnityEngine.Debug:LogError (object)
Opsive.Shared.Input.StandaloneInput:GetButton (string,Opsive.Shared.Input.InputBase/ButtonAction) (at Assets/Opsive/Shared/Input/StandaloneInput.cs:36)
Opsive.Shared.Input.UnityInput:GetButtonInternal (string) (at Assets/Opsive/Shared/Input/UnityInput.cs:223)
Opsive.Shared.Input.PlayerInput:GetButton (string) (at Assets/Opsive/Shared/Input/PlayerInput.cs:215)
Opsive.UltimateCharacterController.Character.Abilities.Ability:CanInputStartAbility (Opsive.Shared.Input.IPlayerInput) (at Assets/Opsive/UltimateCharacterController/Scripts/Character/Abilities/Ability.cs:329)
Opsive.UltimateCharacterController.Character.UltimateCharacterLocomotionHandler:UpdateAbilityInput (Opsive.UltimateCharacterController.Character.Abilities.Ability[]) (at Assets/Opsive/UltimateCharacterController/Scripts/Character/UltimateCharacterLocomotionHandler.cs:132)
Opsive.UltimateCharacterController.Character.UltimateCharacterLocomotionHandler:UpdateAbilityInput () (at Assets/Opsive/UltimateCharacterController/Scripts/Character/UltimateCharacterLocomotionHandler.cs:100)
Opsive.UltimateCharacterController.Character.UltimateCharacterLocomotionHandler:Update () (at Assets/Opsive/UltimateCharacterController/Scripts/Character/UltimateCharacterLocomotionHandler.cs:75)