Question regarding knock back (SetVelocity)
twiliteblue
bug stalker Join Date: 2003-02-04 Member: 13116Members, NS2 Playtester, Squad Five Blue
Hi fellow modders!
I have been experimenting with push/knockback abilities, and experienced a problem.
When I use SetVelocity(v) to push another player, it would fail to do anything, despite the code is being commonly used in game by Infantry Portal, Phase Gate, and Exo.
Would anyone help explain what I'm doing wrong? Does there exist any alternate ways to push a player ?
I have been experimenting with push/knockback abilities, and experienced a problem.
When I use SetVelocity(v) to push another player, it would fail to do anything, despite the code is being commonly used in game by Infantry Portal, Phase Gate, and Exo.
Would anyone help explain what I'm doing wrong? Does there exist any alternate ways to push a player ?
Comments
Let me know if you solve it or don't solve it, I'm going to be doing a bit of modding research tomorrow so I may have a chance to attempt to help solve that problem you're having.
Luckily, through some trial and error, I got Onos charge push working by doing it server-side with a recurring AddTimedCallback.
The AddTimedCallback is used as a loop, (similar to how IP knockback works) when the function called returns "true", so it will keep calling until the function returns "false". In my case, it stops calling KnockDownPlayers() the Onos stops charging.