Posted March 16, 2024 by Mystic
#BlogPost
On my adventure of converting the player systems to code I have ran into a couple problems. First and foremost, we have decided that we are going to handle widgets and animations in blueprints because it makes them easier to handle in unreal. This means that for a lot of functions I need a way to call from c++ to the blueprints whenever I trigger an animation. I tried using a blueprint implementable event, however since we are using replicated and multicasted functions I am unable to implement those functions in blueprints.
The Solution
Enter delegates. The saviour of my code multiple times. I was able to make multicast delegates in code that I then would broadcast in c++ then bind to those delegates in blueprints to call to the animGraph. This alleviated most of my issues. That being said I wont be able to use this for everything because I don't want to have a large number of delegates on the player so things don't get out of hand.