My game has a couple new qualities to pass along with damage dealt to pawns. All my pawns will have a brief moment of being invincible after they are hurt, which I might at some point set to be alterable so different attacks can induce different periods of invincibility. I further need an ability to add a specific "Knock-Back" effect to the player which will induce specific animations and other effects.
I was starting to set this up by simply extending the TakeDamage function within my pawn class. It would add a new optional parameter and call the super.TakeDamage with the default parameters. However when I tried to compile this test I discovered that it would not allow me to redefine the function with a different number of parameters.
So I need a new plan of attack.
I need a way for attacks to add a new variable I can use in the damage code, possibly two.
I'm mulling this over but I don't have anything that really seems like a good idea to me, so I am turning to the forum here to ask if anyone has a good idea about how I should handle this.



Reply With Quote



Bookmarks