|
Post by nekodeshu on Feb 10, 2023 12:51:35 GMT
Hi! I am using the Invector Third Person Controller - Shooter Template. I have one problem. Prefab ...vShooterMelee_Inventory Animator Controller ...Invector@ShooterMelee The script attached to Invector@ShooterMelee's Jump state ', vTriggerSoundByState, is executed twice for BaseLayer processing and OnlyArms processing. When the player jumps, a random sound will be emitted twice. Is there a way around it in the settings? Or do I have to fix the script myself?
|
|
|
Post by Invector on Feb 13, 2023 13:54:53 GMT
Although it calls the method twice or more, I'm not hearing it playing twice here... but anyways, the issue is that the OnlyArms layer is in Sync with the BaseLayer and it copies all the behavior from SubStateMachines, so instead of adding the behavior vTriggerSoundByState in the Jump SubState, you need to put the behavior inside the sub on each State (state info are not copied to syncs layers)
|
|
|
Post by nekodeshu on Feb 23, 2023 2:49:13 GMT
|
|
|
Post by Invector on Feb 23, 2023 17:16:27 GMT
Like I said, it is playing twice because the layer OnlyArms is Sync to the Base layer, Unity can separate behavior on States but not SubMachine states.
You just need to put the vTriggerSoundByState behavior inside the sub on each State (Jump and jumpMove states inside the substate Jump)
This will fix the issue
|
|
|
Post by nekodeshu on Feb 24, 2023 15:29:02 GMT
Thanks for the answer. I was able to solve it by following the instructions. This symptom is difficult to notice, so I contacted you to let you know the symptoms (I noticed it when I changed the character to a female and replaced it with a female voice) It's a very nice asset. It's the best I've purchased so far. Since I started using Invector, Unity's official 3DGameKit has become a piece of junk XD I will continue to use Invector in the future
|
|