So, firstly I need to note I am not using the built-in Platform behavior of Construct2, rather I am using the "Platform2" behavior by Colludium, which has mostly the same actions and events, but includes collision filtering. This is going to factor into why I cannot use the Bullet behavior to accomplish my goal.
So my game is a brawler (Think River City Ransom) and I want attacks to register knockback. i.e. I smack you with a club, your horizontal speed gets updated to move you backward.
This almost works out-of-the-box, except for one issue, the knockback is limited to the object-being-knocked-back's MaxSpeed value. I.e. I smack you for 200 knockback speed, but your maxpeed value is set for a measly walking speed of 50, thus throttling that big smack to a measly whiff.
There are a couple of obvious ideas that come to mind that I have tried so let me explain why they won't work:
1. Update the MaxSpeed value on hits: This is a no-go. How do we know when to reset the MaxSpeed to walking speed? We could wait until the player stops or goes slower than the walking speed, but this takes control away from the player during these moments when they'd rather "lean in" to the momentum or push back against.
2. Throw in the Bullet Behavior and update that instead: I tried this and it worked really beautifully until we collided with the Solid2 (Platform2 solids) objects, it clips through and once the bullet behavior stops moving, it traps the character in the solid or jumps them to the top.
My last option is to run a check before the players Platform2 Control Input fires, to see if they are exceeding a "walkspeed" local variable. This would effectively be a secondary MaxSpeed value, and then I would set the MaxSpeed to an amount above what I expect the highest knockback value to be. In practice I am not happy with the results of this, so I'd love to hear other suggestions.