Thank you sir!The event is called when starting and stopping the item use. The difference is that the bool "use" is set to true/false. Your code does not check for that.
Thank you for the elaborate answer! Ill check the trail out but I dont think it suits my specific sword slashes properly.The melee weapon component has a trail attribute you can add a particle system prefab to. It does not allow to add different prefabs, but you could write your own component that spawns different particle systems, and add this component to the trail field. Take a look at the melee weapons in the demo.
If you are more talking about impact effects, you can take a look at the surface system. This allows to spawn different effects based on the impacted surface. This can also be explored in the demo.
Surface System - Opsive
The Surface System is responsible for spawning effects caused by collisions and impacts. It is designed to be dynamic, powerful, and useful in a board . . .opsive.com
That sounds like a viable solution! I will dig into it, thanks Christian!Yes, you can set a state for each animator audio state. You can then define a presets for each state on your melee weapon which assign different trail prefabs.
You can listen to the state changes through the event system. But I don't see a need for that in your case, as the different trails/particle effects are assigned through the presets. There is an OnStateChange event:https://opsive.com/support/document...ller/programming-concepts/events/event-names/