Hello community,
I’m currently making some skill system. for now i want to make channeling skills that which activates while im standing on ground and not moving.
i want it to be canceled when i start pressing W,A,S,D , Space bar ( for jumping )
To do that, i need a callback function that tells player pressed that. so pawn is moving.
I made it to be canceled when player jump. by overriding ACharacter::OnJumped_Implementation()
But i can’t seem to find a function for movement.
is there a function that i can override for this situation?
- i may send RPC to server when client press WASD key, but it will use lot of network resources so i don’t prefer that (since they will press them a LOT to move around, and it will be nice if i don’t use additional RPC calls for canceling since character movement is actually made on server so server knows player wants to move their character. )
- i may check players speed on tick event so when its higher than zero, cancel the channeling. but when someone push me using LaunchCharacter function or something, i still want the channeling skill not to be canceled, so i can’t use that way
- For now, considering making Replicated bool variable called ’ IsChanneling ’ and send RPC to server to stop it when player press WASD, while the IsChanneling is true, it seems best options i can use it now, but i really want it to be processed on serverside without extra network
Thanks a lot for viewing this.