Problems trying to set up weapons

Attachments

  • Image.jpg
    Image.jpg
    308.4 KB · Views: 13
  • New Bitmap Image (2).png
    New Bitmap Image (2).png
    480.2 KB · Views: 13
  • f.png
    f.png
    279.5 KB · Views: 11
Those hash errors indicate that the animator that you are using are not setup for the controller. This video shows how to create a new animator as well as what all of the parameters are for:

 
Does this work for fps weapons, because the video seems to be for character animations, not for items. Also I have all the parameters from the first person arms demo controller. Looking at the parameter change while I use the weapon, only aiming, equipping and unequipping.
 
Yes, the same set of parameters are used for the arm animations. When you get hash errors it means that you don't have the parameter specified - you could click on that error to see what parameter it is talking about.
 
It is very hard to trouble shoot what parameters arent specified because there is 999+ hash errors. Would it be possible to email the staff a very condensed version of the project with just a test scene and the required files, so you guys can better asses whats happening? I'm sorry for not being very helpful with your trouble shooting.
 
If you click on the hash warning what line does it point to? It'll point to something like this:

Code:
                m_Animator.SetFloat(s_HorizontalMovementHash, value, dampingTime, TimeUtility.DeltaTimeScaled / timeScale);
You can see from this line that s_HorizontalMovementHash is the problem. You can then look at the definition for s_HorizontalMovementHash:
Code:
private static int s_HorizontalMovementHash = Animator.StringToHash("HorizontalMovement");
So in this case the problem relates to the HorizontalMovement parameter.
 
Here are a few:
Code:
Parameter 'Hash 794551356' does not exist.
UnityEngine.Animator:SetInteger(Int32, Int32)
Opsive.UltimateCharacterController.Character.AnimatorMonitor:SetItemSubstateIndexParameter(Int32, Int32) (at Assets/Core/Opsive/UltimateCharacterController/Scripts/Character/AnimatorMonitor.cs:871)
Opsive.UltimateCharacterController.Character.UltimateCharacterLocomotion:UpdateItemAbilityAnimatorParameters(Boolean) (at Assets/Core/Opsive/UltimateCharacterController/Scripts/Character/UltimateCharacterLocomotion.cs:1382)
Opsive.UltimateCharacterController.Character.UltimateCharacterLocomotion:UpdateDirtyAbilityAnimatorParameters() (at Assets/Core/Opsive/UltimateCharacterController/Scripts/Character/UltimateCharacterLocomotion.cs:999)
Opsive.UltimateCharacterController.Character.UltimateCharacterLocomotion:UpdateAnimator() (at Assets/Core/Opsive/UltimateCharacterController/Scripts/Character/UltimateCharacterLocomotion.cs:814)
Opsive.UltimateCharacterController.Character.CharacterLocomotion:Move(Single, Single, Single) (at Assets/Core/Opsive/UltimateCharacterController/Scripts/Character/CharacterLocomotion.cs:480)
Opsive.UltimateCharacterController.Game.KinematicCharacter:Move(Boolean) (at Assets/Core/Opsive/UltimateCharacterController/Scripts/Game/KinematicObjectManager.cs:226)
Opsive.UltimateCharacterController.Game.KinematicObjectManager:Update() (at Assets/Core/Opsive/UltimateCharacterController/Scripts/Game/KinematicObjectManager.cs:805)

Code:
Parameter 'Hash 1228130738' does not exist.
UnityEngine.Animator:SetTrigger(Int32)
Opsive.UltimateCharacterController.Character.AnimatorMonitor:SetItemStateIndexChangeParameter(Int32, Boolean) (at Assets/Core/Opsive/UltimateCharacterController/Scripts/Character/AnimatorMonitor.cs:845)
Opsive.UltimateCharacterController.Character.AnimatorMonitor:SetItemStateIndexParameter(Int32, Int32) (at Assets/Core/Opsive/UltimateCharacterController/Scripts/Character/AnimatorMonitor.cs:818)
Opsive.UltimateCharacterController.Character.UltimateCharacterLocomotion:UpdateItemAbilityAnimatorParameters(Boolean) (at Assets/Core/Opsive/UltimateCharacterController/Scripts/Character/UltimateCharacterLocomotion.cs:1381)
Opsive.UltimateCharacterController.Character.UltimateCharacterLocomotion:UpdateDirtyAbilityAnimatorParameters() (at Assets/Core/Opsive/UltimateCharacterController/Scripts/Character/UltimateCharacterLocomotion.cs:999)
Opsive.UltimateCharacterController.Character.UltimateCharacterLocomotion:Start() (at Assets/Core/Opsive/UltimateCharacterController/Scripts/Character/UltimateCharacterLocomotion.cs:674)

Code:
Parameter 'Hash -1361969041' does not exist.
UnityEngine.Animator:SetInteger(Int32, Int32)
Opsive.UltimateCharacterController.Character.AnimatorMonitor:SnapAnimator() (at Assets/Core/Opsive/UltimateCharacterController/Scripts/Character/AnimatorMonitor.cs:239)
Opsive.Shared.Events.InvokableAction:Invoke()
Opsive.Shared.Events.EventHandler:ExecuteEvent(Object, String)
Opsive.UltimateCharacterController.Character.UltimateCharacterLocomotion:OnImmediateTransformChange(Boolean) (at Assets/Core/Opsive/UltimateCharacterController/Scripts/Character/UltimateCharacterLocomotion.cs:2291)
Opsive.Shared.Events.InvokableAction`1:Invoke(Boolean)
Opsive.Shared.Events.EventHandler:ExecuteEvent(Object, String, Boolean)
Opsive.UltimateCharacterController.Character.UltimateCharacterLocomotion:OnEnable() (at Assets/Core/Opsive/UltimateCharacterController/Scripts/Character/UltimateCharacterLocomotion.cs:633)

Code:
Parameter 'Hash 1966866650' does not exist.
UnityEngine.Animator:SetTrigger(Int32)
Opsive.UltimateCharacterController.Character.AnimatorMonitor:SnapAnimator() (at Assets/Core/Opsive/UltimateCharacterController/Scripts/Character/AnimatorMonitor.cs:238)
Opsive.UltimateCharacterController.Character.AnimatorMonitor:Start() (at Assets/Core/Opsive/UltimateCharacterController/Scripts/Character/AnimatorMonitor.cs:203)
 
UFPS 2 is very confusing for me as I feel if I set up something wrong there would be a problem with all states but it is just the Equip Unequip and Aiming. Shooting, Reloading and Idle work fine.
 
What is the very first error that you are getting? Based on the warnings that you are receiving it doesn't look like the animator controller that you are using has any of the parameters required by the controller.
 
I have the exact same parameters as the animator controller in the demo. The first error I get is:

Code:
Parameter 'Hash -305874817' does not exist.
UnityEngine.Animator:SetInteger(Int32, Int32)
Opsive.UltimateCharacterController.Character.AnimatorMonitor:SnapAnimator() (at Assets/Core/Opsive/UltimateCharacterController/Scripts/Character/AnimatorMonitor.cs:237)
Opsive.Shared.Events.InvokableAction:Invoke()
Opsive.Shared.Events.EventHandler:ExecuteEvent(Object, String)
Opsive.UltimateCharacterController.Character.UltimateCharacterLocomotion:OnImmediateTransformChange(Boolean) (at Assets/Core/Opsive/UltimateCharacterController/Scripts/Character/UltimateCharacterLocomotion.cs:2291)
Opsive.Shared.Events.InvokableAction`1:Invoke(Boolean)
Opsive.Shared.Events.EventHandler:ExecuteEvent(Object, String, Boolean)
Opsive.UltimateCharacterController.Character.UltimateCharacterLocomotion:OnEnable() (at Assets/Core/Opsive/UltimateCharacterController/Scripts/Character/UltimateCharacterLocomotion.cs:633)
 
Ok, yeah, based on that error your animator controller doesn't have one of the SlotXItemID parameters. Because this warning is coming from the AnimatorMonitor it indicates that it is looking for the parameter on the main character's animator, not the arms. If you replace the character's animator with the animator from the demo scene you should get no more warnings within AnimatorMonitor (though you likely will still get them within ChildAnimatorMonitor).
 
Yes, the demo scene with Nolan works but mine don't. I created multiple charcters and they do not produce has errors until I add my weapon. So i'm at a loss.
 
I feel very stupid so apparently me setting the slot id on my weapon to 98 messes it up. I was building off of the Nolan controller and weapons where already using some ids so I jumped to the 90s so I would't get any conflicts. I removed the default weapons and changed all the slot ids to 1 and the hash errors no longer appear. But now my weapon doesn't reload.

Edit: Nevermind my weapon works now. Thank you Justin for all your help, I feel bad for wasting your time by my oversight.
 
Top