Hello,
In my third person character I have an ActorComponent parent class. I also have a variable (Power-up) that is a child of that other class I mentioned. Basically, I set that Power-up variable to a child and I have a virtual function so that the childs play their power-up functionality. The thing is that I’m having trouble replicating the functionality of these power-ups because of a dependency and I don’t know how to solve it.
InputAction Power-up is supposed to trigger the power-up function associated with that child class. So, I’m validating that Power-up is valid (because I have a Power-up system that gives you a random power-up after a cooldown so sometimes you don’t have a power-up). Then with Switch Has Authority I call ServerTrigger (Multicast) that calls that Power-up function. here is the problem, when the clients execute this code coming from the multicast, this Power-up variable will be NULL because that variable is from the server, it has nothing to do with the clients It should be independent of the player that uses this input.
What would be the right way to go about this so that I achieve the funcionality that I want? Thanks!