Looking for functions like ' OnStartedMoving '

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.

Personally I like to use bools to determine if a player is doing a certain action then based on the bools do an if statement. For example when a player presses a movement key a bool named ismoving would be set to true. When the movement key is released the bool is set to false. Then have an if statement check to see if these statements are false. If false then the player can perform whatever actions that required to be standing still.

To cancel it I would think while the channeling skill is being performed have a bool ischanneling set to true. Then an if statement that says if ischanneling is true and ismovement is true then cancel channeling move and set ischanneling to false.

More conditions for canceling / performing chanelling moves would just need more bools.

I made something kind of similar for a slide mechanic in blueprints. Only when the character is sprinting can the slide be performed. If you think it may help I can share some screenshots.

You’re right. for now the simplest way is making the bool variable and check if they’re true to perform the action what i wanted.

Anyway i successfully made the channeling - cancel thing and currently getting no bugs for now. seems fine.

Thanks for the answer!

But still if anyone knows the override-able function when called when player started moving from stopping-state, please let us know so we can improve the system! thanks!