I am attempting to merge two projects right now, a fishing project and a combat project. Both of these projects already have InputAction mappings for left click so I have multiple left-click events in my graph (example: Left Click is cast fishing rod as well as swing sword).
Is it better practice to merge the two InputAction mappings and simply just check the item equipped or should I have two InputAction mappings (both bound to left click) and then check if the correct item is equipped to proceed?
Typically, we add condition checks before triggering the input in case you have all inputs in the player or player controller. Or depending on the blueprint logic, you may also transfer the input to another actor. For instance, imagine you want to turn a lamp on. So the lamp blueprint has a sphere overlap to detect if player is in radius. On overlapping the lamp, it disables player input and enables lamp’s input. So, pressing the key will trigger the same input in the lamp’s blueprint. When player leaves the surrounding area, it disables input from lamp and enables input in player BP.
Interesting, I have put all of the player controls within the ThirdPersonBP.
However, your way seems like a great possible solution for having more organized code.
Essentially what I am doing is spawning the fishing rod and spawning the sword (and destroying the actor once I switch away). So I could just enable input on BeginPlay because only one BP is spawned at a time.
I’ll have to think about this more or maybe wait for some more feedback. Thank you very much!